/* palette-generator.css - Complete standalone CSS file with lock buttons */

/* Reset and Base Styles */
:root {
    --primary-bg: #262624;
    --secondary-bg: #1E1E1C;
    --card-bg: #2A2A28;
    --accent-orange: #FF6B35;
    --accent-blue: #4A9EFF;
    --text-primary: #E8E8E8;
    --text-secondary: #B8B8B8;
    --text-muted: #8A8A8A;
    --border-color: #3A3A38;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;

    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #262624;
    color: #E8E8E8;
    line-height: 1.6;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #1E1E1C;
    border-bottom: 1px solid #3A3A38;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    color: #FF6B35;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #B8B8B8;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-links a:hover {
    color: #E8E8E8;
    text-decoration: none;
}

.nav-links a.active {
    color: #FF6B35;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B35;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
    width: 100%;
}

/* Full Screen Palette Display */
.palette-display {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(100vh - 80px);
    margin: 0;
    padding: 0;
    gap: 0;
}

/* Individual Color Blocks */
.color-block {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
    overflow: hidden;
}

/* Lock Button */
.lock-btn {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 20;
    user-select: none;
}

.lock-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.lock-btn.locked {
    background: rgba(255, 107, 53, 0.9);
    border-color: #FF6B35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.lock-btn.locked:hover {
    background: #FF6B35;
}

/* Color Information */
.color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 2rem 1rem 1rem;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}

.color-hex {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Consolas', monospace;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.color-name {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: capitalize;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Export Button - Fixed Position */
.export-button {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    text-transform: lowercase;
}

.export-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.4);
}

/* Copy Feedback */
.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    color: #262624;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.copy-feedback.show {
    opacity: 1;
}

.lock-btn.locked {
    animation: lockToggle 0.4s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar {
        justify-content: center;
    }

    .palette-display {
        grid-template-columns: 1fr;
        height: calc(100vh - 70px);
    }

    .color-block {
        min-height: 20vh;
    }


    .lock-btn {
        bottom: 6rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .export-button {
        top: auto;
        bottom: 2rem;
        right: 2rem;
        transform: none;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        padding: 0;
        font-size: 0.9rem;
    }

    .export-button:hover {
        transform: scale(1.05);
    }

    .color-hex {
        font-size: 1.2rem;
    }

    .color-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .palette-display {
        height: calc(100vh - 60px);
    }

    .color-block {
        min-height: 18vh;
    }

    .color-info {
        padding: 0.75rem;
    }

    .lock-btn {
        bottom: 3rem;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .color-hex {
        font-size: 1.1rem;
    }

    .color-name {
        font-size: 0.8rem;
    }

    .export-button {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Special effects for locked colors */
.color-block:has(.lock-btn.locked) {
    position: relative;
}

/* Remove the border effect for locked colors */

/* Accessibility improvements */
.lock-btn:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

.color-block:focus {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Dark theme optimizations */
@media (prefers-color-scheme: dark) {
    .lock-btn {
        background: rgba(0, 0, 0, 0.6);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .lock-btn:hover {
        background: rgba(0, 0, 0, 0.8);
        border-color: rgba(255, 255, 255, 0.6);
    }
}

/* Mobile Responsive Fixes - Add these to your existing CSS */

/* Remove gaps between colors on mobile */
@media (max-width: 768px) {
    .palette-display {
        grid-template-columns: 1fr;
        height: calc(100vh - 70px);
        gap: 0; /* Remove gaps completely */
    }

    .color-block {
        min-height: 20vh;
        border: none; /* Remove any borders */
        margin: 0; /* Remove any margins */
    }

    /* Move dataset selector to be more compact on mobile */
    .dataset-selector {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        min-width: auto !important;
        background: rgba(42, 42, 40, 0.95) !important;
        border-radius: 8px !important;
        padding: 0.75rem !important;
        z-index: 999 !important;
    }

    /* Make dataset selector collapsible by default on mobile */
    .dataset-selector h4 {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .dataset-selector .dataset-btn {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .dataset-selector .dataset-btn div div:first-child {
        font-size: 0.75rem !important;
    }

    .dataset-selector .dataset-btn div div:last-child {
        font-size: 0.65rem !important;
    }

    /* Add a generate button for mobile */
    .mobile-generate-btn {
        position: fixed;
        bottom: 90px; /* Above export button */
        right: 2rem;
        background: #4CAF50;
        color: white;
        border: none;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
        z-index: 500;
        transition: all 0.3s ease;
    }

    .mobile-generate-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
    }

    /* Adjust export button position */
    .export-button {
        bottom: 20px;
        right: 2rem;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        font-size: 0.8rem;
        z-index: 500;
    }

    /* Move lock buttons higher to avoid overlap */
    .lock-btn {
        bottom: 6rem !important;
    }

    /* Compact tooltip for mobile */
    .dataset-tooltip {
        position: fixed !important;
        bottom: 160px !important; /* Above both buttons */
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
        text-align: center !important;
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
    }

    /* Hide generation info on mobile - too cluttered */
    .generation-info {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .palette-display {
        height: calc(100vh - 60px);
        gap: 0; /* Ensure no gaps on small screens */
    }

    .color-block {
        min-height: 18vh;
        border: none;
        margin: 0;
    }

    /* Make dataset selector even more compact */
    .dataset-selector {
        top: 5px !important;
        left: 5px !important;
        right: 5px !important;
        padding: 0.5rem !important;
    }

    /* Smaller buttons on very small screens */
    .mobile-generate-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 80px;
        right: 1rem;
        z-index: 999;
    }

    .export-button {
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
        bottom: 15px;
        right: 1rem;
    }

    .lock-btn {
        bottom: 3.5rem !important;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* More compact tooltip */
    .dataset-tooltip {
        bottom: 140px !important;
        font-size: 0.7rem !important;
        padding: 0.4rem !important;
    }
}

/* Desktop - hide mobile generate button */
@media (min-width: 769px) {
    .mobile-generate-btn {
        display: none;
    }
}
/* Mobile Menu Styles - Fixed Version */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #E8E8E8; /* Use direct color since variables might not be loaded */
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #1E1E1C; /* Use direct color */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav.active {
    display: flex;
    transform: translateX(0);
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #B8B8B8; /* Use direct color */
    text-decoration: none;
    padding: 1rem;
    transition: all 0.15s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: #FF6B35; /* Use direct color */
}

/* Mobile menu toggle animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Update existing mobile responsive styles */
@media (max-width: 768px) {
    .nav-links:not(.mobile-nav) {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .navbar {
        justify-content: space-between;
    }
}