/* =====================
   RESET + BASE
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.4;
}

/* =====================
   HEADER
===================== */
.header {
    padding: 1rem;
    text-align: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
}

/* =====================
   CONTAINER
===================== */
.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* =====================
   HOME
===================== */
.home {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.home-title {
    font-size: 2.2rem;
    font-weight: 900;
}

.home-subtitle {
    font-size: 1rem;
    opacity: 0.75;
}

/* =====================
   GAMES GRID
===================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* CARD */
.game-card {
    background: #1a1a1a;
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.15s ease, background 0.15s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    background: #222;
}

.game-icon {
    font-size: 2.2rem;
}

/* DESHABILITADAS */
.game-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.game-card.disabled:hover {
    transform: none;
    background: #1a1a1a;
}

/* =====================
   GAME SCREEN
===================== */
.game {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
}

.game-title {
    font-size: 1.6rem;
    font-weight: 800;
}

.game-progress {
    font-size: 0.9rem;
    opacity: 0.75;
}

/* =====================
   SECONDS BAR
===================== */
.seconds-bar {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.second-step {
    flex: 1;
    padding: 0.4rem 0;
    border-radius: 6px;
    font-size: 0.8rem;
    text-align: center;
    background: #2a2a2a;
    color: #888;
    font-weight: 600;
}

.second-step.active {
    background: #1db954;
    color: #000;
}

.second-step.locked {
    background: #1a1a1a;
    color: #555;
}

/* =====================
   INPUT
===================== */
.game-input {
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    text-align: center;
}

/* =====================
   PLAY BUTTON
===================== */
.btn-play {
    font-size: 1.6rem;
    padding: 1rem;
    background: #1db954;
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;

    transition: transform 0.2s ease;

    animation: playPulse 1.8s infinite;
}

@keyframes playPulse {

    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(29,185,84,0.6);
    }

    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 12px rgba(29,185,84,0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(29,185,84,0);
    }

}

.btn-play:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* =====================
   CONFIRM BUTTON
===================== */
.btn-confirm {
    padding: 0.75rem;
    background: #ffffff;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-confirm:hover {
    opacity: 0.9;
}

/* =====================
   ANSWER BOX
===================== */
.answer-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* =====================
   FEEDBACK
===================== */
.feedback {
    min-height: 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.feedback.error {
    color: #e63946;
}

.feedback.success {
    color: #1db954;
}

.feedback.song-reveal {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* =====================
   INPUT STATES
===================== */
.game-input.error {
    border: 2px solid #e63946;
    animation: shake 0.3s;
}

.game-input.success {
    border: 2px solid #1db954;
}

/* SHAKE ANIMATION */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* =====================
   GAME ACTIONS
===================== */
.game-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.2rem;
}

/* =====================
   SECONDARY BUTTONS
===================== */
.btn-secondary {
    background: #2a2a2a;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
}

/* =====================
   ICON BUTTONS
===================== */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    width: 110px;
    height: 110px;

    padding: 1rem;
}

/* ICONS */
.icon {
    width: 34px;
    height: 34px;
}

/* TEXT */
.action-btn span {
    font-size: 0.9rem;
}

.tags-container {
    margin-bottom: 20px;
}

.tag-category {
    margin-bottom: 10px;
}

.tag-title {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.tag {
    background: #222;
    color: #aaa;
    border: none;
    padding: 6px 10px;
    margin: 4px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
}

.tag.active {
    background: #22c55e;
    color: black;
}

/* =====================
   FILTER INLINE (PRO)
===================== */
.filter-inline {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
     width: 100%; 
}

.filter-inline input {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    background: #1a1a1a;
    color: white;
    font-size: 0.9rem;
    text-align: center;
}

.filter-inline input::placeholder {
    color: #777;
}

.filter-inline button {
    width: 40px;
    border-radius: 8px;
    border: none;
    background: #2a2a2a;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, transform 0.15s ease;
}

.filter-inline button:hover {
    background: #333;
    transform: scale(1.05);
}

/* =====================
   ALERT TOAST
===================== */
.alert-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);

    background: #e63946;
    color: white;

    padding: 0.9rem 1.2rem;
    border-radius: 10px;

    font-size: 0.9rem;
    font-weight: 600;

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;

    z-index: 9999;

    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.alert-box.show {
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
}