/**
 * CHRONICLES OF APOCALYPTICA - THEME SYSTEM STYLES
 * Global CSS variables for theme customization
 */

/* CSS VARIABLES - These are overridden by theme system */
:root {
    --primary-color: #c896ff;
    --secondary-color: #9b6dff;
    --glow-color: rgba(200, 150, 255, 0.6);
    --border-color: #c896ff;
    --hover-color: #b58aff;
    --gradient-bg: linear-gradient(135deg, #1a0a2e 0%, #2a1a3a 100%);
    --button-gradient: linear-gradient(135deg, #c896ff 0%, #9b6dff 100%);
}

/* THEME PICKER BUTTON */
.theme-picker-btn {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--button-gradient);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 9997;
    box-shadow: 0 5px 20px var(--glow-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-picker-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 30px var(--glow-color);
}

/* THEME PICKER MODAL */
.theme-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Comfortaa', cursive;
}

.theme-picker-modal.show {
    opacity: 1;
}

.theme-picker-content {
    background: var(--gradient-bg);
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 50px var(--glow-color);
}

.theme-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.theme-picker-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 20px var(--glow-color);
}

.theme-picker-close {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-picker-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* THEME SWATCHES */
.theme-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.theme-swatch {
    background: rgba(40, 40, 40, 0.5);
    border: 3px solid var(--swatch-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Comfortaa', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.theme-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--swatch-color);
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.theme-swatch:hover::before {
    opacity: 0.2;
}

.theme-swatch:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--swatch-glow);
    border-width: 4px;
}

.theme-swatch.active {
    border-width: 4px;
    box-shadow: 0 0 30px var(--swatch-glow);
    background: rgba(40, 40, 40, 0.8);
}

.theme-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--swatch-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.theme-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--swatch-glow));
}

.theme-name {
    color: var(--swatch-color);
    font-weight: bold;
    font-size: 0.95rem;
    text-align: center;
    text-shadow: 0 0 10px var(--swatch-glow);
}

/* THEME NOTIFICATION */
.theme-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: 'Comfortaa', cursive;
    font-size: 1.1rem;
    z-index: 10003;
    box-shadow: 0 5px 25px var(--glow-color);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.theme-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.theme-notification strong {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

/* CUSTOM COLOR PICKER */
.custom-color-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.custom-color-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px var(--glow-color);
}

.custom-color-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.color-picker-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.color-picker-label span {
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: bold;
}

.color-picker-label input[type="color"] {
    width: 200px;
    height: 80px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    transition: all 0.3s ease;
}

.color-picker-label input[type="color"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    transform: scale(1.05);
}

.color-picker-label input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
}

.color-picker-label input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

.color-picker-label input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}

.apply-custom-btn {
    background: var(--button-gradient);
    border: 3px solid var(--border-color);
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-family: 'Comfortaa', cursive;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--glow-color);
    transition: all 0.3s ease;
}

.apply-custom-btn:hover {
    background: var(--hover-color);
    box-shadow: 0 8px 30px var(--glow-color);
    transform: translateY(-3px);
}

.apply-custom-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 15px var(--glow-color);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .theme-picker-btn {
        bottom: 80px;
        left: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .theme-picker-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .theme-picker-header h2 {
        font-size: 1.5rem;
    }

    .theme-swatches {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .theme-swatch {
        padding: 1rem 0.5rem;
    }

    .theme-icon {
        font-size: 2rem;
    }

    .theme-name {
        font-size: 0.85rem;
    }

    .theme-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 1rem;
        text-align: center;
    }

    .custom-color-title {
        font-size: 1.1rem;
    }

    .color-picker-label input[type="color"] {
        width: 150px;
        height: 60px;
    }

    .apply-custom-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
