:root {
    /* Light theme variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #4a6bff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #6b8cff;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
}

.color-picker {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.color-display {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.color-box {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.color-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.color-info p {
    color: #666;
}

.color-palette {
    margin-top: 2rem;
}

.color-palette h2 {
    color: #333;
    margin-bottom: 1rem;
}

.palette-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
}

.palette-color {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.palette-color:hover {
    transform: scale(1.1);
}

/* Header Styles */
header {
    background-color: var(--bg-primary);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: var(--bg-secondary);
}

.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

/* Main Content Styles */
main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.section {
    background-color: var(--bg-primary);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px var(--shadow-color);
}

h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Color Picker Styles */
.color-picker-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.color-picker-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.color-wheel {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    position: relative;
    cursor: crosshair;
    margin: 0 auto;
}

.color-sliders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.color-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.color-display {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.color-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.value-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.value-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.value-group input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.copy-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.copy-btn:hover {
    color: var(--accent-color);
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

/* Palette Creator Styles */
.palette-creator-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.palette-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

#palette-type {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.palette-display {
    min-height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.palette-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Tools Section Styles */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Footer Styles */
footer {
    background-color: var(--bg-primary);
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .color-values {
        grid-template-columns: 1fr;
    }

    .tools-container {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none;
    }
}

/* Focus Styles */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (forced-colors: active) {
    :root {
        --bg-primary: Canvas;
        --bg-secondary: Canvas;
        --text-primary: CanvasText;
        --text-secondary: CanvasText;
        --accent-color: Highlight;
        --border-color: CanvasText;
    }
} 