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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    min-height: 100vh;
    color: #f5f5dc;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 179, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(26, 26, 46, 0.8) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    border-bottom: 2px solid #ffd700;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5em;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        3px 3px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.3em;
    color: #f5f5dc;
    font-weight: 300;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Navigation Tabs */
.navigation-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.9), rgba(255, 215, 0, 0.8));
    border: 2px solid transparent;
    border-radius: 30px;
    color: #1a1a2e;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: linear-gradient(145deg, #ffd700, #ffb347);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
    border-color: #f5f5dc;
}

.tab-btn.active {
    background: linear-gradient(145deg, #ffd700, #ffb347);
    border-color: #f5f5dc;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 179, 71, 0.5);
}

/* Main Guide Container */
.guide-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Pattern Sections */
.pattern-section {
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.95), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    margin-bottom: 40px;
    padding: 40px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

.pattern-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, #ffd700, #ffb347, #ffd700);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.7;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.2em;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffb347, #ffd700);
    border-radius: 2px;
}

/* Logo Grids */
.logo-grid {
    display: grid;
    gap: 25px;
    justify-items: center;
}

.classic-grid, .tv-grid, .beyond-grid, .alternative-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
}

.modern-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo Items */
.logo-item {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 2px solid transparent;
}

.logo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.logo-item:hover::before {
    opacity: 1;
}

.logo-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(255, 179, 71, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #ffd700;
    background: linear-gradient(145deg, #ffffff, #fffef5);
}

.logo-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 15px;
    border-radius: 10px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
    display: block;
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
}

.logo-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    opacity: 0.7;
}

.logo-label {
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #1a1a2e;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Generator Section */
.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.generator-controls {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #ffd700;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    color: #ffd700;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.control-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background: rgba(245, 245, 220, 0.95);
    color: #1a1a2e;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 10px rgba(255, 179, 71, 0.3);
}

.generate-button, .download-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(145deg, #ffd700, #ffb347);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.generate-button:hover, .download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
    background: linear-gradient(145deg, #ffb347, #ffa500);
}

.generator-preview {
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.95), rgba(255, 255, 255, 0.9));
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #ffd700;
}

.preview-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
}

.generated-image {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    border-radius: 8px;
}

.loading-spinner {
    color: #1a1a2e;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, rgba(245, 245, 220, 0.98), rgba(255, 255, 255, 0.95));
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    position: relative;
    border: 2px solid #ffd700;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #1a1a2e;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: linear-gradient(145deg, #ffd700, #ffb347);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close:hover {
    background: linear-gradient(145deg, #ffb347, #ffa500);
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    text-align: center;
}

.large-logo-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
}

.modal-info h3 {
    font-family: 'Orbitron', monospace;
    font-size: 2.2em;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-info h4 {
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #1a1a2e;
    margin: 25px 0 12px 0;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 8px;
}

.modal-info p {
    color: #1a1a2e;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.era-info {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.1), rgba(255, 179, 71, 0.1));
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #ffd700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes bounceIn {
    0% { 
        opacity: 0;
        transform: scale(0.3);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
    70% { 
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility */
.logo-item:focus {
    outline: 3px solid #ffd700;
    outline-offset: 3px;
}

.tab-btn:focus {
    outline: 2px solid #f5f5dc;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }

    .navigation-tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 18px;
        font-size: 0.8em;
    }

    .logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
    }

    .logo-item {
        padding: 15px;
        min-height: 170px;
    }

    .logo-image {
        width: 100px;
        height: 100px;
    }

    .logo-label {
        font-size: 0.75em;
    }

    .generator-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }

    .modal-info h3 {
        font-size: 1.8em;
    }

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

    .pattern-section {
        padding: 25px;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px 15px;
    }

    .title {
        font-size: 2em;
        letter-spacing: 1px;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 0.7em;
    }

    .logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .logo-image {
        width: 80px;
        height: 80px;
    }

    .guide-container {
        padding: 0 15px;
    }

    .generator-controls, .generator-preview {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .header, .navigation-tabs, .modal, .generator-section {
        display: none !important;
    }
    
    .guide-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .pattern-section {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
    }
    
    body {
        background: white;
        color: black;
    }
}