* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --secondary-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --genie-blue: #1e3a8a;
    --genie-gold: #fbbf24;
    --genie-dark: #000000;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1e3a8a;
    background: #ffffff;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: rgba(30, 58, 138, 0.1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(30, 58, 138, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 2em;
    font-weight: bold;
    color: #1e3a8a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: #1e3a8a;
    font-size: 1.5em;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    color: #1e3a8a;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(30, 58, 138, 0.2);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.8;
}

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

.stat-item {
    background: rgba(30, 58, 138, 0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
}

/* Ad Banners */
.ad-banner {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    color: #666;
}

/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.tool-header p {
    font-size: 1.2em;
    color: #666;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: #f8fafc;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #e6fffa;
    transform: scale(1.02);
}

.upload-area.dragging {
    border-color: #667eea;
    background: #e6fffa;
    transform: scale(1.02);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.tool-card {
    background: white;
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    background: linear-gradient(135deg, var(--genie-blue) 0%, var(--genie-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-card h2,
.tool-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #1e3a8a;
}

.tool-card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.feature-tag {
    background: #f7fafc;
    color: #4a5568;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    border: 1px solid #e2e8f0;
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.success {
    background: var(--success-gradient);
}

.btn.warning {
    background: var(--warning-gradient);
}

.btn.secondary {
    background: var(--secondary-gradient);
}

/* File List */
.file-list {
    margin: 20px 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #edf2f7;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-info i {
    font-size: 24px;
    margin-right: 15px;
    color: #e53e3e;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* Progress Bar */
.progress-container {
    display: none;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

/* Status Messages */
.status-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
}

.status-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.status-info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

/* Page Preview Grid */
.page-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.page-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-item.selected {
    border: 2px solid #667eea;
    background: #f0f4ff;
}

.page-thumbnail {
    width: 100%;
    height: 200px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 15px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    margin-bottom: 20px;
    color: #1e3a8a;
    font-size: 1.2em;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

/* Features Section */
.features-section {
    margin: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--genie-blue) 0%, var(--genie-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 15px;
}

.feature-icon {
    font-size: 2em;
    color: var(--genie-blue);
    flex-shrink: 0;
}

.feature-content h3,
.feature-content h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #1e3a8a;
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
}

.faq-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    padding: 20px 25px;
    text-align: left;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-answer {
    padding: 0 25px 20px;
    color: #718096;
    line-height: 1.7;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Footer */
.footer {
    background: rgba(30, 58, 138, 0.9);
    color: white;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(30, 58, 138, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
        border-radius: 0 0 15px 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        color: white;
    }

    .mobile-menu {
        display: block;
    }

    .main-container {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 20px;
    }

    .content-section {
        padding: 25px 20px;
    }

    .hero {
        padding: 50px 15px;
    }

    .hero h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1em;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .section-title {
        font-size: 2em;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .page-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8em;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.5em;
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .tool-card:hover,
    .btn:hover,
    .quick-link:hover {
        transform: none;
    }

    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}