/* =========================================
   RESET E VARIÁVEIS GLOBAIS - iOS STYLE
   ========================================= */

:root {
    /* Cores iOS */
    --ios-blue: #007AFF;
    --ios-blue-dark: #0051D5;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-yellow: #FFCC00;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D55;
    
    /* Backgrounds iOS */
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-grouped: #F2F2F7;
    --bg-card: rgba(44, 44, 46, 0.8);
    --bg-card-light: rgba(255, 255, 255, 0.1);
    
    /* Cores de texto iOS */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --text-tertiary: rgba(235, 235, 245, 0.3);
    
    /* Espacamento iOS */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Tipografia iOS */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 17px;
    --font-size-sm: 15px;
    --font-size-md: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 28px;
    --font-size-2xl: 34px;
    --font-size-3xl: 40px;
    
    /* Border radius iOS */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Sombras iOS */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.3);
    
    /* Transições iOS */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Safe area (notch) */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Classe utilitária para esconder elementos */
.hidden {
    display: none !important;
}

html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.47;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(175, 82, 222, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   LAYOUT PRINCIPAL - iOS STYLE
   ========================================= */

.app-container {
    min-height: 100vh;
    padding: var(--safe-area-top) 0 var(--safe-area-bottom) 0;
}

.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: slideIn var(--transition-base);
    padding: max(var(--safe-area-top), 20px) 20px max(var(--safe-area-bottom), 20px) 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.header {
    text-align: center;
    padding: var(--spacing-md) 0 var(--spacing-lg) 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.main-content.centered {
    justify-content: center;
    align-items: center;
}

.footer {
    text-align: center;
    padding: var(--spacing-lg) 0 var(--spacing-sm) 0;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.credits {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
}

.credits-line {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.credits-link {
    color: var(--ios-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
}

.credits-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ios-blue);
    transition: width var(--transition-fast);
}

.credits-link:hover::after,
.credits-link:active::after {
    width: 100%;
}

.credits-link:active {
    opacity: 0.7;
}

/* =========================================
   TIPOGRAFIA - iOS STYLE
   ========================================= */

.title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-small {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.4px;
}

.subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 500;
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.3px;
}

.instruction-text {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.instruction-text.centered {
    text-align: center;
}

.warning-text {
    color: var(--ios-orange);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.info-text {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

/* =========================================
   BOTÕES - iOS STYLE
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    min-height: 50px;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.2px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:active::before {
    opacity: 1;
}

.btn:focus {
    outline: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--ios-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary:active {
    background: var(--ios-blue-dark);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn-secondary:active {
    background: rgba(60, 60, 67, 0.6);
}

.btn-large {
    padding: 18px 32px;
    font-size: var(--font-size-lg);
    min-height: 56px;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.btn-small {
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    min-height: 36px;
    border-radius: var(--radius-sm);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* =========================================
   CARDS - iOS FROSTED GLASS
   ========================================= */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
}

.pass-card {
    text-align: center;
    padding: var(--spacing-2xl);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.player-name {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--spacing-md) 0;
    letter-spacing: -0.5px;
}

.pass-instruction {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 500;
}

.reveal-card {
    text-align: center;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 2px solid;
}

.reveal-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.reveal-card.innocent {
    background: linear-gradient(135deg, 
        rgba(52, 199, 89, 0.3) 0%, 
        rgba(48, 176, 199, 0.3) 100%
    );
    border-color: var(--ios-green);
    box-shadow: 0 8px 32px rgba(52, 199, 89, 0.4);
}

.reveal-card.suspect {
    background: linear-gradient(135deg, 
        rgba(255, 59, 48, 0.3) 0%, 
        rgba(255, 45, 85, 0.3) 100%
    );
    border-color: var(--ios-red);
    box-shadow: 0 8px 32px rgba(255, 59, 48, 0.4);
}

.reveal-role {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.reveal-theme {
    font-size: 3rem;
    font-weight: 900;
    margin: var(--spacing-md) 0;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.reveal-instruction {
    font-size: var(--font-size-base);
    opacity: 0.9;
    margin-top: var(--spacing-sm);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.info-card {
    text-align: center;
    padding: var(--spacing-2xl);
}

.start-player-card {
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.15) 0%, 
        rgba(175, 82, 222, 0.15) 100%
    );
    border: 2px solid var(--ios-blue);
}

.player-number-giant {
    font-size: 10rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin: var(--spacing-md) 0;
    text-shadow: 0 8px 32px rgba(0, 122, 255, 0.3);
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.player-highlight {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ios-orange) 0%, var(--ios-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--spacing-sm) 0 var(--spacing-md) 0;
    letter-spacing: -0.5px;
}

.result-card {
    text-align: center;
    padding: var(--spacing-2xl);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-card.victory {
    background: linear-gradient(135deg, 
        rgba(52, 199, 89, 0.3) 0%, 
        rgba(48, 176, 199, 0.3) 100%
    );
    border-color: var(--ios-green);
    box-shadow: 0 8px 32px rgba(52, 199, 89, 0.4);
}

.result-card.eliminated {
    background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.3) 0%, 
        rgba(255, 204, 0, 0.3) 100%
    );
    border-color: var(--ios-orange);
    box-shadow: 0 8px 32px rgba(255, 149, 0, 0.4);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: var(--spacing-md);
    animation: bounceIn var(--transition-bounce);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.4px;
}

.result-description {
    font-size: var(--font-size-base);
    opacity: 0.9;
    line-height: 1.5;
    font-weight: 500;
}

/* =========================================
   FORMULÁRIOS - iOS STYLE
   ========================================= */

.setup-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Animação suave para aparecer/desaparecer seções */
#manual-selection-area:not(.hidden),
#custom-themes-area:not(.hidden) {
    animation: slideDown var(--transition-base);
    transform-origin: top;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 2000px;
        transform: translateY(0);
    }
}

.form-label {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.form-input {
    padding: 14px 16px;
    font-size: var(--font-size-base);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
    min-height: 50px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.form-input:focus {
    outline: none;
    border-color: var(--ios-blue);
    background: rgba(60, 60, 67, 0.6);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 400;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    gap: 12px;
}

.radio-label span {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radio-label strong {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.radio-hint {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 400;
    display: block;
    line-height: 1.3;
}

.radio-label:active {
    transform: scale(0.98);
}

.radio-label:has(input:checked) {
    background: rgba(0, 122, 255, 0.15);
    border-color: var(--ios-blue);
}

.radio-label:has(input:checked) strong {
    color: var(--ios-blue);
}

.radio-label input[type="radio"] {
    margin: 0;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--ios-blue);
    flex-shrink: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-xs);
    max-height: 320px;
    overflow-y: auto;
    padding: var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-grid::-webkit-scrollbar {
    width: 8px;
}

.checkbox-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.checkbox-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.checkbox-label:active {
    transform: scale(0.96);
}

.checkbox-label:has(input:checked) {
    background: rgba(0, 122, 255, 0.15);
    border-color: var(--ios-blue);
}

.checkbox-label input[type="checkbox"] {
    margin-right: var(--spacing-xs);
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--ios-blue);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn-small {
    width: 100%;
}

/* Em telas maiores, volta para layout horizontal */
@media (min-width: 480px) {
    .input-group {
        flex-direction: row;
    }
    
    .input-group .btn-small {
        width: auto;
    }
}

/* =========================================
   CHIPS (TAGS) - iOS STYLE
   ========================================= */

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    min-height: 100px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-start;
    align-content: flex-start;
}

.chips-container .empty-state {
    width: 100%;
    padding: var(--spacing-md);
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    text-align: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 8px 14px;
    background: var(--ios-blue);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    animation: chipIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes chipIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
    opacity: 0.8;
    transition: all var(--transition-fast);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chip-remove:active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   ESTATÍSTICAS E LISTAS - iOS STYLE
   ========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-section {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eliminated-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--spacing-lg);
    font-size: var(--font-size-sm);
}

.eliminated-player {
    padding: var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--ios-red);
    font-weight: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* =========================================
   VOTAÇÃO - iOS STYLE
   ========================================= */

.vote-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
}

.player-vote-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    font-weight: 600;
    min-height: 90px;
}

.player-vote-option:active {
    transform: scale(0.96);
}

.player-vote-option input[type="radio"] {
    display: none;
}

.player-vote-option.selected {
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.3) 0%, 
        rgba(175, 82, 222, 0.3) 100%
    );
    border-color: var(--ios-blue);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.4);
}

/* =========================================
   MENSAGENS E ALERTAS - iOS STYLE
   ========================================= */

.error-message {
    padding: var(--spacing-md);
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid var(--ios-red);
    border-radius: var(--radius-md);
    color: #FF6B6B;
    font-weight: 500;
    text-align: center;
    font-size: var(--font-size-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* =========================================
   MODAL - iOS STYLE
   ========================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn var(--transition-base);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp var(--transition-base);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 1;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.btn-close {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.btn-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-body h3 {
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--ios-blue);
    font-weight: 600;
    letter-spacing: -0.2px;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p,
.modal-body ul,
.modal-body ol {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.modal-body ul,
.modal-body ol {
    padding-left: var(--spacing-lg);
}

.modal-body li {
    margin-bottom: var(--spacing-xs);
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-secondary);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    position: sticky;
    bottom: 0;
}

/* =========================================
   TOAST - iOS STYLE
   ========================================= */

.toast {
    position: fixed;
    top: max(var(--safe-area-top), 60px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    max-width: 90%;
    animation: toastSlideDown var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =========================================
   RESPONSIVIDADE - iOS STYLE
   ========================================= */

/* Mobile: número menor */
@media (max-width: 480px) {
    .player-number-giant {
        font-size: 7rem;
    }
}

@media (min-width: 640px) {
    .screen {
        padding: max(var(--safe-area-top), 40px) 40px max(var(--safe-area-bottom), 40px) 40px;
    }
    
    .button-group {
        flex-direction: row;
    }
    
    .modal-content {
        border-radius: var(--radius-xl);
        max-width: 540px;
        max-height: 80vh;
        animation: modalSlideIn var(--transition-base);
    }
    
    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
    
    .modal {
        align-items: center;
        padding: var(--spacing-md);
    }
}

@media (min-width: 768px) {
    :root {
        --font-size-base: 17px;
    }
    
    .main-content {
        max-width: 600px;
    }
    
    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .players-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* =========================================
   ACESSIBILIDADE - iOS STYLE
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Foco visível para navegação por teclado */
*:focus-visible {
    outline: 2px solid var(--ios-blue);
    outline-offset: 3px;
}

/* Melhor contraste para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================
   DETALHES FINAIS iOS
   ========================================= */

/* Scrollbar customizada estilo iOS */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Seleção de texto estilo iOS */
::selection {
    background: rgba(0, 122, 255, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 122, 255, 0.3);
    color: var(--text-primary);
}

/* Inputs iOS */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Efeito de pressionar em todos elementos interativos */
button,
.btn,
.radio-label,
.checkbox-label,
.player-vote-option {
    -webkit-user-select: none;
    user-select: none;
}

/* Loading state (para futuras melhorias) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Efeito de brilho nos cards principais */
.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* Versão específica */
.version {
    font-variant-numeric: tabular-nums;
}

/* =========================================
   BOTÃO FLUTUANTE DE AJUDA - iOS STYLE
   ========================================= */

.btn-help-float {
    position: fixed;
    bottom: max(var(--safe-area-bottom), 24px);
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ios-blue);
    color: white;
    border: none;
    box-shadow: 
        0 4px 12px rgba(0, 122, 255, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all var(--transition-fast);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn-help-float:active {
    transform: scale(0.9);
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-help-float svg {
    width: 28px;
    height: 28px;
}

/* Pulso sutil para chamar atenção */
@keyframes helpPulse {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(0, 122, 255, 0.4),
            0 8px 24px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(0, 122, 255, 0.6),
            0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

.btn-help-float.pulse {
    animation: helpPulse 2s ease-in-out infinite;
}
