/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252b3d;
    --text-primary: #e8eaf0;
    --text-secondary: #b8bcc8;
    --text-muted: #8a8d98;
    --accent-primary: #4a9eff;
    --accent-secondary: #6bb6ff;
    --accent-hover: #7cc5ff;
    --border-color: #2d3441;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(74, 158, 255, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Main Content */
.main-content {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.intro-section {
    background: transparent;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.info-section {
    background: transparent;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.intro-section h2,
.info-section h2 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.intro-section p,
.info-section p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.intro-section strong,
.info-section strong {
    color: var(--accent-secondary);
}

/* Animals Section */
.animals-section {
    background: transparent;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}

.animals-section h2 {
    color: var(--accent-primary);
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    text-align: center;
}

.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.animal-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.animal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.1), transparent);
    transition: left 0.5s;
}

.animal-card:hover::before {
    left: 100%;
}

.animal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.animal-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    display: block;
}

.animal-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 0.5rem;
}

.animal-name-en {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: capitalize;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 3% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 750px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    animation: slideDown 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 32px;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: var(--accent-primary);
    transform: rotate(90deg);
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.modal-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    padding: 2.5rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
}

.modal-header .animal-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(74, 158, 255, 0.4));
}

.modal-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.modal-header .animal-name-en {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-body {
    padding: 2.5rem;
    background: var(--bg-secondary);
}

.modal-body h3 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.75rem;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.2);
}

.modal-body p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-body .info-item {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    transition: var(--transition);
}

.modal-body .info-item:hover {
    background: var(--bg-primary);
    border-left-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.2);
}

.modal-body .info-item strong {
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.modal-body .info-item span {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact Section */
.contact-section {
    background: transparent;
    padding: 2.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.contact-section h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: bold;
}

.contact-email {
    display: block;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: normal;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: var(--transition);
    word-break: break-all;
}

.contact-email:hover {
    color: var(--accent-primary);
}

.contact-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.footer a {
    color: var(--accent-primary);
    text-decoration: underline;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        height: 75px;
        padding: 0.75rem 1rem;
    }
    
    .logo {
        font-size: 1.6rem;
        margin-bottom: 0.2rem;
    }
    
    .tagline {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .intro-section,
    .info-section {
        padding: 1.5rem;
    }
    
    .animals-section {
        padding: 2rem 1rem;
    }
    
    .animals-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    
    .animal-icon {
        font-size: 3rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header h2 {
        font-size: 1.8rem;
    }
    
    .intro-section h2,
    .info-section h2,
    .animals-section h2,
    .contact-section h2 {
        font-size: 1.8rem;
    }
    
    .contact-section {
        min-height: calc(100vh - 150px);
        padding: 2rem 1rem;
    }
    
    .contact-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-email {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        height: 70px;
        padding: 0.5rem 1rem;
    }
    
    .logo {
        font-size: 1.4rem;
        margin-bottom: 0.15rem;
    }
    
    .tagline {
        font-size: 0.75rem;
    }
    
    .animals-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.75rem;
    }
    
    .animal-card {
        padding: 1rem;
    }
    
    .animal-icon {
        font-size: 2.5rem;
    }
    
    .animal-name {
        font-size: 0.95rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}
