/**
 * ZL Color Tool - Dark Green Theme
 * Matches ZL.md design system
 */

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a1414 0%, #0f1c1c 50%, #0a1414 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Navigation */
.site-nav {
    border-bottom: 1px solid #1a3535;
    padding: 20px 0;
    margin-bottom: 30px;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #00cc66;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00ff88;
}

.nav-links a.current {
    color: #00ff88;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 3.5em;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1em;
    font-weight: 300;
    color: #888;
    letter-spacing: 1px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #fff;
}

.tool-subtitle {
    font-size: 1.1em;
    color: #00ff88;
    font-weight: 300;
}

/* Main Interface */
.color-interface {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Picker Section */
.picker-section {
    background: linear-gradient(135deg, #0f1c1c 0%, #162626 100%);
    border: 1px solid #1a3535;
    border-radius: 12px;
    padding: 30px;
}

.picker-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.color-preview {
    width: 300px;
    height: 300px;
    border-radius: 12px;
    border: 2px solid #1a3535;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.preview-hex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8em;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.picker-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
    justify-content: center;
}

.control-group {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    align-items: center;
    gap: 15px;
}

.control-group label {
    font-size: 0.95em;
    color: #00ff88;
    font-weight: 500;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.value-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95em;
    color: #00cc66;
    text-align: right;
}

/* Format Display */
.format-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.format-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-group label {
    font-size: 0.85em;
    color: #00ff88;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.format-value {
    display: flex;
    gap: 10px;
}

.format-value input {
    flex: 1;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #1a3535;
    border-radius: 6px;
    padding: 10px 12px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.format-value input:focus {
    outline: none;
    border-color: #00ff88;
}

.copy-btn {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00cc66;
    border-radius: 6px;
    padding: 10px 15px;
    color: #00ff88;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.copy-btn:hover {
    background: rgba(0, 255, 136, 0.3);
    transform: scale(1.05);
}

/* Palette Section */
.palette-tabs {
    background: linear-gradient(135deg, #0f1c1c 0%, #162626 100%);
    border: 1px solid #1a3535;
    border-radius: 12px;
    padding: 30px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #1a3535;
    border-radius: 6px;
    padding: 10px 20px;
    color: #00cc66;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00cc66;
}

.tab-btn.active {
    background: rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
    color: #00ff88;
}

.palette-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    min-height: 180px;
    margin-bottom: 20px;
}

.palette-color {
    height: 180px;
    border-radius: 8px;
    border: 2px solid #1a3535;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    position: relative;
}

.palette-color:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
}

.palette-hex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.palette-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00cc66;
    border-radius: 6px;
    padding: 12px 24px;
    color: #00ff88;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

/* Recent Colors */
.recent-colors {
    background: linear-gradient(135deg, #0f1c1c 0%, #162626 100%);
    border: 1px solid #1a3535;
    border-radius: 12px;
    padding: 30px;
}

.recent-colors h3 {
    color: #00ff88;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.recent-swatch {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #1a3535;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recent-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
    border-color: #00ff88;
}

.empty-state {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Contrast Checker */
.contrast-checker {
    background: linear-gradient(135deg, #0f1c1c 0%, #162626 100%);
    border: 1px solid #1a3535;
    border-radius: 12px;
    padding: 30px;
}

.contrast-checker h3 {
    color: #00ff88;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.contrast-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contrast-color-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contrast-color-group label {
    font-size: 0.9em;
    color: #00ff88;
    font-weight: 500;
}

.contrast-color-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.contrast-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #1a3535;
}

.contrast-color-display input {
    flex: 1;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #1a3535;
    border-radius: 6px;
    padding: 10px 12px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.contrast-results {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contrast-ratio {
    text-align: center;
    padding: 20px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
}

.ratio-label {
    font-size: 0.9em;
    color: #888;
    margin-right: 10px;
}

.ratio-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2em;
    color: #00ff88;
    font-weight: 600;
}

.wcag-compliance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.compliance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 6px;
}

.compliance-label {
    font-size: 0.9em;
    color: #ccc;
}

.compliance-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.compliance-badge.pass {
    background: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.compliance-badge.fail {
    background: rgba(255, 80, 80, 0.3);
    color: #ff5050;
}

.contrast-preview-text {
    margin-top: 20px;
}

.preview-text-sample {
    padding: 30px;
    border-radius: 8px;
    border: 2px solid #1a3535;
}

.preview-text-sample p {
    margin: 10px 0;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 136, 0.9);
    color: #0a1414;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: #555;
    font-size: 0.9em;
    border-top: 1px solid #222;
    margin-top: 40px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5em;
    }

    .tool-header h1 {
        font-size: 1.8em;
    }

    .picker-container {
        grid-template-columns: 1fr;
    }

    .color-preview {
        width: 100%;
        height: 250px;
    }

    .control-group {
        grid-template-columns: 80px 1fr 60px;
        gap: 10px;
    }

    .format-display {
        grid-template-columns: 1fr;
    }

    .palette-display {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .palette-color {
        height: 120px;
    }

    .contrast-controls {
        grid-template-columns: 1fr;
    }

    .tab-buttons {
        justify-content: center;
    }

    .nav-links {
        gap: 15px;
    }
}
