/* style3.css - Vibrant & Playful Theme (Compact Version - Colors Synced with style.css) */

html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

/* --- Light Theme (Base Styles with Colors from style.css) --- */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6; /* Keep compact line height */
    color: #374155; /* Base text color from style.css */
    background-color: #f8fafc; /* Base bg from style.css */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Keep compact padding */
}

.main-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px; /* Keep compact padding */
    width: 100%;
}

/* Header Styling - Light Theme (SYNCED FROM style.css) */
.site-header {
    background-color: #ffffff; /* Header bg */
    color: #1e293b; /* Header text */
    padding: 15px 0;
    position: sticky;
    height: 80px; /* Original height */
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 1px 3px rgba(100, 116, 139, 0.08); /* Header shadow */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; position: relative; height: 100%;}
.logo a { text-decoration: none; display: flex; align-items: center; }
.logom{ width: 60px; cursor: pointer; }

/* Navigation Styling - Light Theme (SYNCED FROM style.css) */
.main-nav ul { list-style: none; display: flex; gap: 20px; padding: 0; margin: 0; }
.main-nav ul li { padding: 0; }
.main-nav ul li a {
    color: #1e293b; /* Header text */
    text-decoration: none;
    font-size: 17px; /* Original size */
    padding: 8px 12px; /* Original padding */
    border-radius: 4px; /* Original radius */
    transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav ul li a:hover, .main-nav ul li a.active {
    color: #3b82f6; /* Link color */
    background-color: #f1f5f9; /* Header hover bg */
}

/* Dropdown Menu Styles - Light Theme (SYNCED FROM style.css) */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff; /* Dropdown bg */
    min-width: 200px; /* Original min-width */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Dropdown shadow */
    z-index: 1001;
    border-radius: 5px; /* Original radius */
    left: 50%;
    transform: translateX(-50%); /* Original transform */
    right: auto;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    padding: 5px 0; /* Keep padding */
}
.dropdown-content a {
    color: #374155; /* Dropdown text color */
    padding: 12px 16px; /* Original padding */
    text-decoration: none;
    display: block;
    /* font-size: 15px; Inherit from nav */
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 0;
}
.dropdown-content a:hover {
    background-color: #f1f5f9; /* Dropdown hover bg */
}
.dropdown:hover .dropdown-content { display: block; }

/* Tool Specific Styles - Compact Version - Light Theme (Colors Synced) */
h1{
    text-align: center;
    padding-bottom: 20px;
    margin-top: 5px;
    color: #1e293b; /* Heading color */
    font-size: 2.25rem; /* Keep compact size */
    font-weight: 700;
    transition: color 0.3s ease;
    letter-spacing: -0.4px;
}

.input-area,
.output-area {
    margin-bottom: 25px;
    padding: 25px;
    border: none;
    border-radius: 12px;
    background-color: #ffffff; /* Main container bg */
    box-shadow: 0 5px 15px rgba(100, 116, 139, 0.06); /* Adjusted shadow */
    width: 100%;
    max-width: 600px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.input-area .tool-description {
    text-align: center;
    color: #64748b; /* Footer text color */
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}
.input-area label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #374155; /* Base text color */
    font-weight: 500;
    transition: color 0.3s ease;
}
.input-area input[type="color"],
.input-area input[type="number"],
.input-area select {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0; /* Border color */
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: #f8fafc; /* Base bg */
    color: #1e293b; /* Heading color */
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.2s ease;
    outline: none;
}
.input-area input[type="color"] { height: 40px; padding: 3px; box-shadow: 0 0 0 1px #e2e8f0; border-radius: 6px; }
.input-area select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E"); /* Footer text color */
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 0.9em;
  padding-right: 35px;
}
.input-area input[type="color"]:focus,
.input-area input[type="number"]:focus,
.input-area select:focus {
    border-color: #3b82f6; /* Link color */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); /* Focus ring color */
    background-color: #ffffff;
}
.input-area button {
    background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%); /* Hero button primary bg */
    color: #ffffff; /* Hero button primary text */
    padding: 12px 22px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); /* Adjusted shadow */
    letter-spacing: 0.2px;
}
.input-area button:hover {
    transform: translateY(-2px) scale(1.01);
    background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%); /* Hero button primary hover bg */
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); /* Adjusted hover shadow */
}
.input-area button:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2); /* Adjusted active shadow */
}

/* Conditional Options Styling */
.conditional-option { display: none; margin-top: 0; }
body.show-mono .conditional-option#mono-type-label, body.show-mono #monochromatic-type.conditional-option { display: block; }
body.show-analogous .conditional-option#analogous-variance-label, body.show-analogous #analogous-variance.conditional-option { display: block; }

.palette { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding-top: 8px;}
.palette div { /* Color Swatch */
    width: calc(20% - 11px);
    padding-bottom: calc(20% - 11px);
    height: 0;
    min-width: 55px; min-height: 55px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(100, 116, 139, 0.1); /* Adjusted shadow using style.css card shadow base */
    position: relative; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    overflow: hidden;
    border: 1px solid transparent;
}
.palette div:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15); /* Adjusted hover shadow */
    border-color: rgba(255, 255, 255, 0.7);
}
.copy-button {
    position: absolute; top: 4px; right: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none; padding: 3px 6px; border-radius: 4px;
    cursor: pointer; font-size: 0.7rem;
    color: #374155; /* Base text color */
    opacity: 0; font-weight: 500;
    transition: opacity 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}
.palette div:hover .copy-button { opacity: 1; }

/* Footer - Light Theme (Consistent) */
#footer { background-color: #f1f5f9; padding: 40px 0; color: #64748b; transition: background-color 0.2s ease, color 0.2s ease; border-top: 1px solid #e2e8f0; }
#footer .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
#footer .footer-columns { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
#footer .footer-column { flex: 1; min-width: 180px; margin-bottom: 30px; text-align: left; }
#footer .footer-column h3 { font-size: 1.2rem; margin-bottom: 15px; color: #1e293b; transition: color 0.2s ease; }
#footer .footer-column ul { list-style: none; padding: 0; }
#footer .footer-column li { margin-bottom: 8px; }
#footer .footer-column a { color: #3b82f6; text-decoration: none; transition: color 0.2s ease; }
#footer .footer-column a:hover { color: #1d4ed8; }

/* Theme Toggle Button - Light Theme (Consistent) */
#theme-toggle { position: fixed; top: 15px; right: 20px; width: 50px; height: 50px; border-radius: 50%; border: 1px solid #d1d5db; background-color: #ffffff; cursor: pointer; padding: 0; display: flex; justify-content: center; align-items: center; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease; z-index: 1001; }
#theme-toggle:hover { background-color: #f8fafc; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); }
#theme-toggle:active { transform: scale(0.95); }
#theme-toggle:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
#theme-toggle .icon { display: block; width: 24px; height: 24px; border-radius: 50%; background-color: #facc15; position: relative; box-shadow: 0 0 3px rgba(0, 0, 0, 0.05); transition: all 0.2s ease-in-out, background-color 0.2s ease; transform: scale(1) rotate(0deg); }


/* --- Dark Theme Styles --- */
body[data-theme="dark"] {
    color: #d1d5db;
    background-color: #0b1120;
}

/* Header - Dark (SYNCED) */
body[data-theme="dark"] .site-header { background-color: #111827; color: #f0f9ff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
body[data-theme="dark"] .main-nav ul li a { color: #f0f9ff; }
body[data-theme="dark"] .main-nav ul li a:hover { color: #60a5fa; background-color: #1f293b; }

/* Dropdown - Dark (SYNCED) */
body[data-theme="dark"] .dropdown-content { background-color: #1f293b; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
body[data-theme="dark"] .dropdown-content a { color: #f0f9ff; }
body[data-theme="dark"] .dropdown-content a:hover { background-color: #334155; }

/* Main Container - Dark */
body[data-theme="dark"] .main-container {
    background-color: #1f293b; /* Dark container bg */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* Darker shadow */
}

/* Tool Specific - Dark */
body[data-theme="dark"] h1 { color: #f0f9ff; }
body[data-theme="dark"] .input-area,
body[data-theme="dark"] .output-area {
    background-color: #1e293b; /* Dark tool section bg */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Adjusted dark shadow */
}
body[data-theme="dark"] .input-area .tool-description { color: #94a3b8; } /* Dark secondary text */
body[data-theme="dark"] .input-area label { color: #cbd5e1; } /* Dark label */
body[data-theme="dark"] .input-area input[type="color"],
body[data-theme="dark"] .input-area input[type="number"],
body[data-theme="dark"] .input-area select {
    border-color: #334155; /* Dark border */
    background-color: #111827; /* Dark input bg */
    color: #e2e8f0; /* Dark input text */
}
body[data-theme="dark"] .input-area input[type="color"] { box-shadow: 0 0 0 1px #334155; }
body[data-theme="dark"] .input-area select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
}
body[data-theme="dark"] .input-area input[type="color"]:focus,
body[data-theme="dark"] .input-area input[type="number"]:focus,
body[data-theme="dark"] .input-area select:focus {
    border-color: #60a5fa; /* Dark link color */
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3); /* Dark focus ring */
    background-color: #1e293b; /* Dark tool section bg */
}
body[data-theme="dark"] .input-area button {
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%); /* Dark button primary bg */
    color: #1e293b; /* Dark button primary text */
    box-shadow: 0 4px 10px rgba(167, 139, 250, 0.15); /* Adjusted dark shadow */
}
body[data-theme="dark"] .input-area button:hover {
    background: linear-gradient(90deg, #38bdf8 0%, #c4b5fd 100%); /* Dark button primary hover bg */
    box-shadow: 0 5px 15px rgba(167, 139, 250, 0.2); /* Adjusted dark hover shadow */
}
body[data-theme="dark"] .input-area button:active {
    box-shadow: 0 2px 6px rgba(167, 139, 250, 0.15); /* Adjusted dark active shadow */
}

body[data-theme="dark"] .palette div { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); } /* Adjusted dark shadow */
body[data-theme="dark"] .palette div:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); border-color: #475569;} /* Adjusted dark hover shadow */
body[data-theme="dark"] .copy-button {
    background-color: rgba(30, 41, 59, 0.85); /* Dark copy bg */
    color: #d1d5db; /* Dark copy text */
}

/* Footer - Dark (Consistent) */
body[data-theme="dark"] #footer { background-color: #111827; color: #94a3b8; border-top-color: #1f2937; }
body[data-theme="dark"] #footer .footer-column h3 { color: #e2e8f0; }
body[data-theme="dark"] #footer .footer-column a { color: #60a5fa; }
body[data-theme="dark"] #footer .footer-column a:hover { color: #93c5fd; }

/* Theme Toggle Button - Dark (Consistent) */
body[data-theme="dark"] #theme-toggle { border-color: #334155; background-color: #1f293b; }
body[data-theme="dark"] #theme-toggle:hover { background-color: #334155; }
body[data-theme="dark"] #theme-toggle:focus-visible { outline-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3); }
body[data-theme="dark"] #theme-toggle .icon { background-color: #eab308; transform: scale(1) rotate(180deg) translateX(-1px); box-shadow: inset -5px -3px 0 0px #0b1120; }


/* Responsive Design (Keep existing layout adjustments) */
@media (max-width: 768px) {
     /* Intro animation responsive styles - REMOVED */
    /* Header unchanged */
    .site-header { height: 100px; } /* Slightly shorter header */
    .site-header .container { flex-wrap: nowrap; }
    .logo { flex-grow: 1; }
    .main-nav { order: 3; width: 100%;} /* Pushed below logo/toggle */
    .main-nav ul { flex-direction: row; align-items: center; gap: 5px; } /* Stack links vertically */
    .main-nav ul li { width: 100%; text-align: center;} /* Make list items full width */

    .dropdown1 { position: fixed; transform: none; box-shadow: none; background-color: #ffffff; text-align: center; left: 200px; width: 20%; }
    body[data-theme="dark"] .dropdown-content { background-color: #1e293b; }
    .dropdown-content a { padding: 8px 10px; }
    body[data-theme="light"] .dropdown-content a { color:#cbd5e1 ; } /* Adjusted mobile dropdown color */
    body[data-theme="dark"] .dropdown-content a { color: #374155; } /* Adjusted mobile dropdown color */
    .dropdown > a i { /* Hide the dropdown icon on mobile */
        display: none;
    }

    h1 { font-size: 2rem; }
    .main-content-area { padding-top: 20px; padding-bottom: 20px;}
    .input-area, .output-area { padding: 20px; border-radius: 12px;} /* Reduced padding/radius */
    .input-area input[type="color"],
    .input-area input[type="number"],
    .input-area select { font-size: 0.9rem; }
    .input-area button { font-size: 1rem; padding: 12px 20px; }
    .palette div { width: calc(25% - 10px); padding-bottom: calc(25% - 10px); min-width: 50px; min-height: 50px; border-radius: 8px; }

    #footer .footer-columns { flex-direction: row; align-items: center; }
    #footer .footer-column { width: 100%; margin-bottom: 20px; text-align: center; }
}

@media (max-width: 480px) {
     h1 { font-size: 1.75rem; }
     .palette div { width: calc(33.33% - 9px); padding-bottom: calc(33.33% - 9px); }
     .input-area, .output-area { padding: 15px; border-radius: 10px;}
     .input-area button { font-size: 0.95rem; }
}