* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #667eea;
    --color-primary-dark: #5a67d8;
    --color-secondary: #764ba2;
    --color-success: #48bb78;
    --color-warning: #ed8936;
    --color-danger: #f56565;
    --color-text: #1a202c;
    --color-text-secondary: #718096;
    --color-background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    --color-surface: rgba(255, 255, 255, 0.95);
    --color-border: #e2e8f0;
    --color-border-light: #f7fafc;
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.18);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    --radius: 16px;
    --radius-large: 24px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --color-primary: #81e6d9;
    --color-primary-dark: #4fd1c7;
    --color-secondary: #b794f6;
    --color-success: #68d391;
    --color-warning: #f6ad55;
    --color-danger: #fc8181;
    --color-text: #f7fafc;
    --color-text-secondary: #a0aec0;
    --color-background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    --color-surface: rgba(45, 55, 72, 0.95);
    --color-border: #4a5568;
    --color-border-light: #2d3748;
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px rgba(129, 230, 217, 0.3);
}

body {
    font-family: var(--font-family);
    background: var(--color-background);
    color: var(--color-text);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%);
    background-attachment: fixed;
}

.app {
    min-height: 100vh;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 600px;
    width: 100%;
}

/* Landing Screen */
.hero {
    text-align: center;
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-glow), var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-height: 52px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98) translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary) 100%);
    box-shadow: var(--shadow-large), var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-small);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--color-border-light);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
    border-color: var(--color-primary);
}

/* Additional button variants */
.btn-danger {
    background: var(--color-danger);
    color: #fff;
    box-shadow: var(--shadow-small);
}

.btn-danger:hover {
    filter: brightness(0.95);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-small);
}

.btn-outline:hover {
    background: var(--color-border-light);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-medium);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
    transform: translateX(2px);
}

.full-width {
    width: 100%;
}

/* Form Components */
.form-card {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-large);
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-family: var(--font-family);
    transition: opacity 0.2s ease;
}

.back-btn:hover {
    opacity: 0.7;
}

.form-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-surface);
    color: var(--color-text);
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-medium);
    transform: translateY(-1px);
}

/* Poker Room */
#pokerRoomScreen {
    background: var(--color-background);
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* New inline header layout */
.room-header-inline {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 1.5rem;
    box-shadow: var(--shadow-medium);
    margin: 0 1.5rem 1.5rem 1.5rem;
}

.room-info-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.room-info-inline h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

.room-id-inline {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.controls-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.timer-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--color-background);
    border-radius: var(--radius);
    border: 1px solid var(--color-border-light);
}

.timer-input-inline {
    width: 35px;
    padding: 0.25rem;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.timer-input-inline:focus {
    outline: none;
}

.timer-display-inline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    min-width: 35px;
    text-align: center;
}

.timer-display-inline.warning {
    color: var(--color-warning);
    animation: pulse 1s infinite;
}

.room-header {
    background: var(--color-surface);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.room-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.copy-btn {
    background: var(--color-primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.room-actions {
    display: flex;
    gap: 0.75rem;
    justify-self: end;
}

/* Header Timer */
.header-timer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 122, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 122, 255, 0.1);
}

.timer-input-header {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 500;
}

[data-theme="dark"] .timer-input-header {
    background: var(--color-background);
    border-color: var(--color-border);
}

.timer-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.timer-btn:hover {
    background: var(--color-primary-dark);
}

.timer-btn.stop {
    background: var(--color-danger);
}

.timer-btn.stop:hover {
    background: #E60026;
}

.timer-display-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    min-width: 50px;
    text-align: center;
}

.timer-display-header.warning {
    color: var(--color-warning);
    animation: pulse 1s infinite;
}

.room-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Main Voting Area */
.main-voting-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.5rem;
}

/* Voting Status */
.voting-status {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-small);
}

.status-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border-light);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Participants Compact */
.participants-compact {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-small);
}

.participants-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.participant-badge {
    background: var(--color-primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Participants */
.participants {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 1.5rem;
    box-shadow: var(--shadow-medium);
}

.participants h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.participant {
    background: var(--color-background);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-small);
    transition: all 0.2s ease;
    min-width: 120px;
    border: 1px solid var(--color-border-light);
}

.participant.voted {
    border-left: 4px solid var(--color-success);
    background: rgba(52, 199, 89, 0.05);
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.participant-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-status {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.vote-status.voted {
    background: rgba(52, 199, 89, 0.1);
    color: var(--color-success);
}

.vote-status.waiting {
    background: rgba(109, 109, 112, 0.1);
    color: var(--color-text-secondary);
}

/* Voting Section */
.voting-section {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}

.voting-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.voting-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.vote-card {
    width: 80px;
    height: 100px;
    background: var(--color-surface);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: var(--shadow-small);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.vote-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vote-card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vote-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-large), var(--shadow-glow);
}

.vote-card.selected {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-6px) scale(1.1);
    box-shadow: var(--shadow-large), var(--shadow-glow);
    animation: pulse-selected 2s infinite;
}

@keyframes pulse-selected {
    0%, 100% { box-shadow: var(--shadow-large), var(--shadow-glow); }
    50% { box-shadow: var(--shadow-large), 0 0 30px rgba(102, 126, 234, 0.5); }
}

/* Results */
.results-section {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}

.results-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-summary {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.vote-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.vote-result {
    background: var(--color-background);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    min-width: 80px;
    border: 1px solid var(--color-border-light);
}

.vote-result-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vote-result-count {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--color-text);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-large);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--color-success);
}

.toast.error {
    background: var(--color-danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    #pokerRoomScreen {
        height: 100vh;
    }
    
    .room-content {
        gap: 1rem;
        height: calc(100vh - 120px);
        padding: 0.5rem;
    }
    
    .room-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Mobile styles for new inline layout */
    .room-header-inline {
        padding: 1rem;
        margin: 0 0.5rem 1rem 0.5rem;
        border-radius: var(--radius);
    }
    
    .main-voting-area {
        padding: 0 0.5rem;
    }
    
    .room-info-inline {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .room-info-inline h2 {
        font-size: 1.25rem;
    }
    
    .controls-line {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .controls-line .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        min-height: 44px;
        flex: 1;
        max-width: 120px;
    }
    
    .timer-inline {
        padding: 0.4rem;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .timer-input-inline {
        width: 40px;
        font-size: 0.9rem;
    }
    
    .room-actions {
        justify-content: center;
    }
    
    .voting-cards {
        gap: 0.5rem;
        justify-content: center;
        padding: 0 0.5rem;
    }
    
    .vote-card {
        width: 65px;
        height: 85px;
        font-size: 1.4rem;
        border-width: 1px;
    }
    
    .vote-card:hover {
        transform: translateY(-2px) scale(1.03);
    }
    
    .vote-card.selected {
        transform: translateY(-3px) scale(1.08);
    }
    
    .results-summary {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        flex: 1;
        min-width: 120px;
    }
    
    .hero {
        padding: 2rem 1rem;
        margin: 1rem;
        border-radius: var(--radius);
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .participants-compact {
        margin: 0 0.5rem;
    }
    
    .participants-list {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .participant {
        min-width: 90px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .voting-section {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
    
    .results-section {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }
    
    .voting-status {
        margin: 0 0.5rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}

.hero {
    position: relative;
}

/* Theme toggle mini version for room */
.theme-toggle-mini {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-left: 0.5rem;
}

.theme-toggle-mini:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle-mini {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle-mini:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Timer Section */
.timer-section {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    padding: 1.5rem;
    box-shadow: var(--shadow-medium);
    text-align: center;
    margin-bottom: 1rem;
}

.timer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timer-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    text-align: center;
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
}

[data-theme="dark"] .timer-input {
    background: var(--color-background);
    border-color: var(--color-border);
}

[data-theme="dark"] .form-group input {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .form-group input:focus {
    border-color: var(--color-primary);
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
}

.timer-display.warning {
    color: var(--color-warning);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@media (max-width: 480px) {
    .screen {
        padding: 0.5rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .form-card {
        padding: 1.25rem;
        margin: 0.5rem;
    }
    
    .form-card h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .voting-section {
        padding: 1.25rem 0.75rem;
        margin: 0 0.25rem;
    }
    
    .results-section {
        padding: 1.25rem 0.75rem;
        margin: 0 0.25rem;
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .timer-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timer-display {
        font-size: 1.5rem;
    }
    
    .voting-cards {
        gap: 0.4rem;
        padding: 0;
    }
    
    .vote-card {
        width: 58px;
        height: 75px;
        font-size: 1.2rem;
    }
    
    .controls-line .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-height: 40px;
        max-width: 100px;
    }
    
    .room-header-inline {
        padding: 0.75rem;
        margin: 0 0.25rem 0.75rem 0.25rem;
    }
    
    .room-info-inline h2 {
        font-size: 1.1rem;
    }
    
    .hero {
        padding: 1.5rem 0.75rem;
        margin: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .results-summary {
        gap: 1rem;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .vote-distribution {
        gap: 0.5rem;
    }
    
    .vote-result {
        padding: 0.75rem;
        min-width: 60px;
    }
    
    .actions {
        gap: 0.75rem;
    }
    
    .btn {
        min-height: 48px;
        font-size: 0.9rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .vote-card {
        width: 50px;
        height: 65px;
        font-size: 1rem;
    }
    
    .controls-line .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        min-height: 36px;
        max-width: 80px;
    }
    
    .room-info-inline h2 {
        font-size: 1rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .hero {
        padding: 1.25rem 0.5rem;
    }
    
    .form-card {
        padding: 1rem;
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border-light);
    padding: 0.75rem;
    text-align: center;
    z-index: 100;
}

[data-theme="dark"] .footer {
    background: rgba(0, 0, 0, 0.95);
    border-top-color: var(--color-border);
}

.privacy-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.privacy-link:hover {
    color: var(--color-primary);
}

.footer-separator {
    color: var(--color-text-secondary);
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.about-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.card-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.card-value {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.card-explanation {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 1rem;
    line-height: 1.5;
}

.about-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
    margin-top: 2rem;
}

.about-footer p {
    color: var(--color-text-secondary);
    font-style: italic;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-large);
    width: 100%;
    max-width: 800px;
    box-shadow: var(--shadow-large);
    position: relative;
    margin-bottom: 2rem;
}

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

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal .logo-icon {
    width: 40px;
    height: 40px;
    box-shadow: none;
    animation: none;
    background: none;       /* use plain brand mark */
    border-radius: 0;       /* no rounded container */
}

.modal-header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.modal-body {
    padding: 2rem;
    color: var(--color-text);
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

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

.modal-body ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.modal-body li {
    margin-bottom: 0.25rem;
}

.modal-body a {
    color: var(--color-primary);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Support modal tweaks */
.method-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.method-panel h3 {
    margin-top: 0.5rem;
}

.qr-wrap {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
}

img.qr {
    width: 180px;
    height: auto;
    background: #fff;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-small);
}

@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}
