/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 700px;
    margin: 20px auto 0;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 50px 0;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tool-icon {
    width: 50px;
    height: 50px;
    color: #2563eb;
    margin-bottom: 15px;
}

.tool-card h2 {
    font-size: 1.4rem;
    color: #1e293b;
    margin: 15px 0 10px;
}

.tool-card p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.tool-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.tool-card:nth-child(2) .tool-tag {
    background: #10b981;
}

/* Features Section */
.features-section {
    background: white;
    border-radius: 12px;
    padding: 50px 40px;
    margin: 60px 0 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    text-align: center;
}

.features-section h2 {
    margin-top: 0;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Text Tool Styles */
.text-tool-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.text-area-group {
    margin-bottom: 25px;
}

.text-area-group label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.text-area-group textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

.text-area-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.textarea-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.cleaning-options {
    margin: 30px 0;
    padding: 25px;
    background: #f8fafc;
    border-radius: 8px;
}

.cleaning-options h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e293b;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.btn-option {
    background: white;
    border: 2px solid #e2e8f0;
    color: #334155;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-option:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-copy {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: #1d4ed8;
}

/* Aspect Ratio Calculator Styles */
.upload-option {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-option h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

#uploadStatus {
    display: inline-block;
    margin-left: 15px;
    font-weight: 600;
}

.divider {
    text-align: center;
    margin: 25px 0;
    color: #94a3b8;
    font-weight: 600;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.calculator-section h3 {
    margin-top: 25px;
    margin-bottom: 15px;
}

.helper-text {
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 15px;
}

.dimension-inputs {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.multiply-sign {
    font-size: 1.5rem;
    color: #94a3b8;
    font-weight: bold;
    padding-bottom: 12px;
}

.aspect-ratio-display {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #075985;
    display: none;
}

.calc-results {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.calc-results h3 {
    margin-top: 0;
    color: #059669;
}

.result-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    font-size: 1.3rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.result-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #059669;
}

.ratio-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #86efac;
    color: #065f46;
    line-height: 1.8;
}

.common-ratios {
    margin-top: 30px;
    padding: 25px;
    background: #fef3c7;
    border-radius: 8px;
}

.common-ratios h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.ratio-btn {
    background: white;
    border: 2px solid #fbbf24;
    color: #78350f;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ratio-btn:hover {
    background: #fbbf24;
    color: white;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.mode-btn {
    padding: 12px 30px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* File Extension Identifier */
.input-method {
    margin-bottom: 30px;
}

.method-option {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 15px;
}

.method-option h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.extension-info {
    background: white;
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.extension-info h2 {
    color: #2563eb;
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
}

.info-item strong {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item span {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.description-box {
    background: #e0f2fe;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.description-box h3 {
    margin-top: 0;
    color: #0284c7;
}

.description-box p {
    color: #075985;
    line-height: 1.7;
    margin: 0;
}

.software-box {
    background: #f0fdf4;
    padding: 20px;
    border-radius: 8px;
}

.software-box h3 {
    margin-top: 0;
    color: #059669;
}

.software-box ul {
    margin: 0;
    padding-left: 20px;
    color: #065f46;
}

.software-box li {
    padding: 5px 0;
}

h1 {
    font-size: 2.5rem;
    color: #1e293b;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin: 40px 0 20px;
}

h3 {
    font-size: 1.3rem;
    color: #334155;
    margin: 20px 0 10px;
}

/* Intro Text */
.intro-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #64748b;
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    margin: 40px 0;
}

.tool-section {
    margin: 40px 0;
}

.upload-box {
    background: white;
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #2563eb;
    background-color: #f8fafc;
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.upload-box h3 {
    color: #334155;
    margin-bottom: 10px;
}

.upload-box p {
    color: #64748b;
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #64748b;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* Result Section */
.result-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.result-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: bold;
}

.dpi-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #78350f;
}

.recommendation {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #075985;
    line-height: 1.6;
}

.status-excellent {
    color: #059669 !important;
}

.status-good {
    color: #0284c7 !important;
}

.status-warning {
    color: #d97706 !important;
}

.status-danger {
    color: #dc2626 !important;
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-section li:last-child {
    border-bottom: none;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.faq-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

.faq-item p {
    color: #64748b;
    line-height: 1.7;
}

/* Footer */
footer {
    background-color: #1e293b;
    color: #cbd5e1;
    padding: 30px 0;
    margin-top: 60px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-box {
        padding: 40px 20px;
    }
    
    footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
