/**
 * @file components.css
 * @description Reusable UI components - buttons, cards, inputs, tags, badges
 *
 * @requires base.css (CSS variables)
 * @usedBy All screens
 *
 * @status COMPLETE
 */

/* ==================== BUTTONS ==================== */

/* Primary Button */
.btn-primary {
    padding: 14px 50px;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Intro Button */
.intro-btn {
    padding: 14px 50px;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.intro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

/* Start Button */
.start-btn {
    padding: 14px 50px;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    opacity: 0.4;
    pointer-events: none;
}

.start-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

.start-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

/* Surprise Me Button */
.surprise-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surprise-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

/* Back Link */
.back-link {
    margin-top: 20px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.8;
}

/* Setting Button */
.setting-btn {
    padding: 6px 14px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 15px;
    background: #f5f5f5;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

body.dark-mode .setting-btn {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    color: #eee;
}

.setting-btn:hover {
    background: rgba(67, 97, 238, 0.2);
    border-color: var(--primary);
}

.setting-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

/* Icon Button */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

body.dark-mode .icon-btn {
    background: rgba(255,255,255,0.1);
}

.icon-btn:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: scale(1.05);
}

/* ==================== CARDS ==================== */

/* Mode Card */
.mode-card {
    width: 240px;
    padding: 30px 25px;
    background: var(--card-light);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.dark-mode .mode-card {
    background: var(--card-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.15);
}

.mode-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.mode-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mode-desc {
    font-size: 0.8rem;
    opacity: 0.6;
    line-height: 1.5;
}

/* ==================== TAGS ==================== */

.panel-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--primary);
    transition: all 0.2s ease;
}

body.dark-mode .panel-tag {
    background: rgba(67, 97, 238, 0.2);
}

.panel-tag:hover {
    background: var(--primary);
    color: white;
}

/* ==================== BADGES ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(67, 97, 238, 0.15);
    color: var(--primary);
}

.badge-success {
    background: rgba(6, 214, 160, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 209, 102, 0.2);
    color: #e6a700;
}

/* ==================== INPUTS ==================== */

.input-field {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--card-light);
    color: var(--text-light);
    transition: border-color 0.2s ease;
    width: 100%;
}

body.dark-mode .input-field {
    background: var(--card-dark);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-dark);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
}

.input-field::placeholder {
    opacity: 0.5;
}

/* ==================== ANIMATIONS ==================== */

.click-ripple {
    position: fixed;
    border-radius: 50%;
    background: var(--ripple-light);
    transform: scale(0);
    animation: ripple 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

body.dark-mode .click-ripple {
    background: var(--ripple-dark);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==================== COUNTDOWN ==================== */

.countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 200;
    z-index: 2000;
    opacity: 0;
    animation: countPulse 0.8s ease-out forwards;
}

@keyframes countPulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}
