/* ================================
   Theme Variables
================================ */

/* Default Theme (Blue) */
[data-theme="default"] {
    --primary: #4a90d9;
    --primary-dark: #2c5282;
    --primary-light: #ebf4ff;
    --accent: #3182ce;
    --font-family: 'Noto Sans JP', sans-serif;
}

/* Nature Theme (Green) */
[data-theme="nature"] {
    --primary: #38a169;
    --primary-dark: #276749;
    --primary-light: #f0fff4;
    --accent: #48bb78;
    --font-family: 'Noto Serif JP', serif;
}

/* Sweet Theme (Pink) */
[data-theme="sweet"] {
    --primary: #d53f8c;
    --primary-dark: #97266d;
    --primary-light: #fff5f7;
    --accent: #ed64a6;
    --font-family: 'Kosugi Maru', sans-serif;
}

/* Dark Theme (Purple) */
[data-theme="dark"] {
    --primary: #805ad5;
    --primary-dark: #553c9a;
    --primary-light: #2d3748;
    --accent: #9f7aea;
    --bg-main: #1a202c;
    --bg-white: #2d3748;
    --text-main: #e2e8f0;
    --text-light: #a0aec0;
    --border: #4a5568;
    --shadow: rgba(0, 0, 0, 0.3);
    --font-family: 'BIZ UDGothic', sans-serif;
}

[data-theme="dark"] .logo {
    color: #e2e8f0;
}

[data-theme="dark"] .logo:hover {
    color: var(--primary);
}

[data-theme="dark"] .header {
    background: #2d3748;
}

[data-theme="dark"] .nav-list a:hover {
    color: var(--accent);
}

[data-theme="dark"] .card-image {
    background: linear-gradient(135deg, var(--primary-light) 0%, #1a202c 100%);
}

[data-theme="dark"] .category-card h3 {
    color: var(--accent);
}

[data-theme="dark"] .profile-info h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .profile-card {
    background: #1a202c;
}

/* ================================
   Theme Switcher UI
================================ */
.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.theme-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.theme-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
}

.theme-option:hover {
    background: var(--primary-light);
}

.theme-option.active {
    background: var(--primary-light);
    font-weight: 600;
}

.theme-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-color-preview.default { background: #4a90d9; }
.theme-color-preview.nature { background: #38a169; }
.theme-color-preview.sweet { background: #d53f8c; }
.theme-color-preview.dark { background: #805ad5; }

/* Responsive */
@media (max-width: 480px) {
    .theme-switcher {
        bottom: 15px;
        right: 15px;
    }

    .theme-toggle-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .theme-menu {
        right: -10px;
        min-width: 160px;
    }
}
