* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-logo h2 {
    color: #6c5ce7;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #6c5ce7;
}

.auth-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.auth-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.auth-btn i {
    font-size: 1rem;
}

/* Profile image styles */
.profile-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s;
}

.auth-btn:hover .profile-img {
    border-color: rgba(255, 255, 255, 0.6);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.upload-preview {
    background: rgba(255,255,255,0.1);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 2px dashed rgba(255,255,255,0.3);
}

.upload-preview i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Marketing Images Section */
.marketing-images {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.before-after-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: rgba(255,255,255,0.1);
    padding: 3rem;
    border-radius: 25px;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.unreadable-section,
.chatgptable-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.marketing-images .marketing-image {
    width: 400px !important;
    height: 300px !important;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
    display: block;
    max-width: 400px;
    max-height: 300px;
    min-width: 400px;
    min-height: 300px;
}

.marketing-image:hover {
    transform: scale(1.05);
}

.image-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-container i {
    font-size: 3rem;
    color: rgba(255,255,255,0.9);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Upload Section */
.upload-section {
    padding: 80px 0;
    background: white;
}

.upload-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
}

.upload-area {
    border: 3px dashed #6c5ce7;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area * {
    pointer-events: none;
}

.upload-area:hover {
    border-color: #5a4fcf;
    background: #f0f2ff;
}

.upload-area.dragover {
    border-color: #ff6b6b;
    background: #fff5f5;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 4rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-content p {
    color: #666;
    font-size: 1.1rem;
}

#file-input {
    display: none;
}

.file-list {
    margin: 2rem 0;
}

.empty-file-list {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.file-item {
    background: white;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info i {
    font-size: 1.5rem;
    color: #6c5ce7;
}

.process-btn {
    width: 100%;
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 2rem;
}

.process-btn:hover:not(:disabled) {
    background: #5a4fcf;
}

.process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.process-btn.insufficient-pages {
    background: #ff6b6b !important;
    color: white !important;
    cursor: not-allowed;
    animation: warningPulse 2s infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Process Controls */
.process-controls {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spell-check-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s;
}

.spell-check-toggle:hover {
    color: #6c5ce7;
}

.spell-check-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6c5ce7;
    cursor: pointer;
}

.spell-check-toggle span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.spell-check-toggle i {
    font-size: 0.9rem;
    color: #6c5ce7;
}

/* Results Section */
.results-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.results-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.text-output {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    min-height: 300px;
    margin-bottom: 2rem;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    border: 1px solid #e9ecef;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.copy-btn, .download-btn {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover, .download-btn:hover {
    background: #5a4fcf;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: #f8f9ff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.1);
}

.feature-card i {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: #f8f9fa;
}

.pricing h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    color: #333;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pricing-card {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.price {
    margin-bottom: 2rem;
}

.currency {
    font-size: 1.5rem;
    color: #666;
}

.amount {
    font-size: 4rem;
    font-weight: bold;
    color: #6c5ce7;
}

.period {
    font-size: 1.2rem;
    color: #666;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-list i {
    color: #27ae60;
    font-size: 1.1rem;
}

.subscribe-btn {
    width: 100%;
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 1rem;
}

.subscribe-btn:hover {
    background: #5a4fcf;
}

.trial-note {
    color: #666;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

#auth-form input {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#auth-form input:focus {
    outline: none;
    border-color: #6c5ce7;
}

#auth-submit {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

#auth-submit:hover {
    background: #5a4fcf;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.auth-switch a {
    color: #6c5ce7;
    text-decoration: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Currency Display in Navigation */
.pages-display {
    background: rgba(108, 92, 231, 0.1);
    border: 2px solid #6c5ce7;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #6c5ce7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pages-display:hover {
    background: rgba(108, 92, 231, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.pages-display i {
    font-size: 1.1rem;
}

#pages-count {
    font-size: 1.2rem;
    font-weight: 700;
}

.pages-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #6c5ce7;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: #ecf0f1;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.support-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #6c5ce7;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.support-email:hover {
    background: #6c5ce7;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.support-email i {
    font-size: 1rem;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .support-email {
        display: inline-flex;
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        padding: 0 15px;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    .auth-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .profile-img {
        width: 20px;
        height: 20px;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Marketing Images Mobile */
    .before-after-container {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
    }
    
    .marketing-images .marketing-image {
        width: 280px !important;
        height: 210px !important;
        max-width: 280px;
        max-height: 210px;
        min-width: 280px;
        min-height: 210px;
    }
    
    .arrow-container i {
        font-size: 2rem;
        transform: rotate(90deg);
    }
    
    .image-label {
        font-size: 1rem;
    }
    
    /* Upload Section */
    .upload-section {
        padding: 60px 0;
    }
    
    .upload-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .upload-area {
        padding: 3rem 1rem;
        margin: 0 15px;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .upload-content p {
        font-size: 1rem;
    }
    
    /* Results */
    .result-container {
        padding: 0 15px;
    }
    
    .actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Process Controls */
    .process-controls {
        gap: 0.8rem;
    }
    
    .spell-check-toggle {
        font-size: 0.9rem;
    }
    
    .spell-check-toggle input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    /* Pages Display */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .nav-center {
        order: 2;
    }
    
    .nav-menu {
        order: 3;
    }
    
    .pages-display {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    #pages-count {
        font-size: 1.1rem;
    }
    
    /* Pricing */
    .pricing-card {
        margin: 0 15px;
        padding: 2rem 1.5rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .upload-section h2 {
        font-size: 1.6rem;
    }
    
    .upload-area {
        padding: 2rem 0.5rem;
    }
    
    .auth-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
    
    .profile-img {
        width: 18px;
        height: 18px;
    }
    
    .nav-logo h2 {
        font-size: 1.3rem;
    }
}
