:root {
    --bg-color: #002147;
    --text-color: #89CFF0;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition-speed: 0.3s;
    --accent-color: #89CFF0;
    --header-bg: rgba(0, 26, 56, 0.95);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-top: 60px; /* Space for sticky header */
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(137, 207, 240, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 44px;
    width: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-link, .footer-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.brand-link:hover, .footer-link:hover {
    opacity: 0.8;
}

.main-footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(137, 207, 240, 0.1);
    margin-top: 60px;
}

.main-footer p {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.9rem;
    margin: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 0;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0;
    -webkit-overflow-scrolling: touch;
}

.header-nav::-webkit-scrollbar {
    display: none;
}

#colors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-intro {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent-color);
    margin-left: 8px;
    animation: blink 0.7s infinite;
    transition: opacity 0.3s ease;
}

.section-title.typing-done::after {
    opacity: 0;
    animation: none;
    width: 0;
    margin-left: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Controls Styles */
.controls {
    margin-bottom: 40px;
}

.search-container input {
    width: 100%;
    padding: 18px 24px;
    border-radius: 16px;
    border: 1px solid rgba(137, 207, 240, 0.2);
    background: rgba(137, 207, 240, 0.05);
    color: var(--text-color);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(137, 207, 240, 0.1);
}

.search-container input:focus {
    border-color: var(--accent-color);
    background: rgba(137, 207, 240, 0.1);
    box-shadow: 0 0 20px rgba(137, 207, 240, 0.2);
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(137, 207, 240, 0.2);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(137, 207, 240, 0.1);
    border-color: var(--accent-color);
}

.filter-btn.active {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.color-card {
    background: #001a38;
    border: 1px solid rgba(137, 207, 240, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.color-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(137, 207, 240, 0.4);
}

.color-swatch {
    height: 180px;
    width: 100%;
}

.color-info {
    padding: 20px;
}

.color-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.color-hex {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.3rem;
    opacity: 0.6;
}

.no-results.hidden {
    display: none;
}

.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(137, 207, 240, 0.95);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10;
}

.copy-feedback.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .main-header {
        height: auto;
    }
    
    body {
        padding-top: 120px;
    }
}

@media (max-width: 600px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}