@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kalam', cursive;
    background: #0a0e27;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, white, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, white, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 700px;
    position: relative;
}

.screen {
    background: linear-gradient(135deg, #1a1d2e 0%, #16182a 100%);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 
        0 0 0 6px #0d0f1f,
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255,255,255,0.05);
    border: 5px solid #2a2d45;
    display: none;
    animation: fadeIn 0.3s ease-in;
    color: white;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General Typography */
h2 {
    color: #ffffff;
    font-size: 2em;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

h3 {
    color: #ffffff;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 3.5em;
    color: #C51111;
    margin-bottom: 10px;
    text-shadow: 
        4px 4px 0 #000,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 30px rgba(197, 17, 17, 0.5);
    font-weight: 700;
    letter-spacing: 2px;
}

.logo p {
    color: #a0a0b0;
    font-size: 1.2em;
}

/* Menu */
.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 18px 35px;
    font-size: 1.3em;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Kalam', cursive;
    box-shadow: 
        0 6px 0 rgba(0,0,0,0.5),
        0 8px 20px rgba(0,0,0,0.4);
    position: relative;
    top: 0;
}

.btn:hover {
    top: 2px;
    box-shadow: 
        0 4px 0 rgba(0,0,0,0.5),
        0 6px 15px rgba(0,0,0,0.4);
}

.btn:active {
    top: 6px;
    box-shadow: 
        0 0 0 rgba(0,0,0,0.5),
        0 2px 10px rgba(0,0,0,0.4);
}

.btn-primary {
    background: linear-gradient(180deg, #4A90E2 0%, #2E5C8A 100%);
    color: white;
    border: 3px solid #5FA3E8;
}

.btn-secondary {
    background: linear-gradient(180deg, #6B6B7B 0%, #3A3A4A 100%);
    color: white;
    border: 3px solid #8B8B9B;
}

.btn-info {
    background: linear-gradient(180deg, #4ECDC4 0%, #2A7C76 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(180deg, #FF4444 0%, #C51111 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(180deg, #FFB800 0%, #FF8C00 100%);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn:disabled:hover,
.btn:disabled:active {
    top: 0;
    box-shadow: 
        0 6px 0 rgba(0,0,0,0.5),
        0 8px 20px rgba(0,0,0,0.4);
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form label {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.form input,
.form select {
    padding: 15px;
    font-size: 1.1em;
    border: 4px solid #3a4055;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #0d0f1f;
    color: white;
    font-family: 'Kalam', cursive;
}

.form input:focus,
.form select:focus {
    outline: none;
    border-color: #3AAFFF;
    box-shadow: 0 0 20px rgba(58, 175, 255, 0.5);
}

.form input::placeholder {
    color: #6a6a7a;
}

/* Game Code Display */
.game-code-display {
    background: linear-gradient(180deg, #C51111 0%, #8B0000 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: 5px;
    margin-bottom: 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 
        0 0 0 4px #000,
        0 8px 20px rgba(0,0,0,0.5);
    border: 3px solid #ffffff30;
}

.game-code-display.small {
    font-size: 1.2em;
    padding: 12px;
    margin-bottom: 15px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid white;
    color: white;
    font-size: 1.3em;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
    position: relative;
    top: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    top: 1px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.copy-btn:active {
    top: 3px;
    box-shadow: 0 0 0 rgba(0,0,0,0.3);
}

.copy-btn.small {
    font-size: 1em;
    padding: 6px 10px;
}

/* Lobby */
.lobby-header {
    text-align: center;
}

.lobby-header h2 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 2.5em;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

.player-list {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-item {
    background: linear-gradient(135deg, #24273f 0%, #181a2e 100%);
    padding: 18px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 3px solid #2a2d45;
    box-shadow: 
        0 4px 0 rgba(0,0,0,0.6),
        0 6px 15px rgba(0,0,0,0.4);
}

.player-item:hover {
    border-color: #3a3d55;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 rgba(0,0,0,0.6),
        0 8px 20px rgba(0,0,0,0.5);
}

.player-item.dead {
    opacity: 0.5;
}

.player-item.dead .player-color {
    background: #666 !important;
    filter: grayscale(1);
}

.player-color {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 4px solid #000;
    box-shadow: 
        0 0 0 2px rgba(255,255,255,0.3),
        inset 0 -8px 15px rgba(0,0,0,0.3),
        inset 0 8px 15px rgba(255,255,255,0.2),
        0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
    position: relative;
}

.player-color::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    filter: blur(3px);
}

.player-color[style*="cursor: pointer"]:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 0 3px rgba(255,255,255,0.4),
        0 0 0 6px #667eea,
        0 0 20px rgba(102, 126, 234, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.6);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: bold;
    font-size: 1.3em;
    color: #ffffff;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.player-status {
    font-size: 1em;
    color: #a0a0b0;
}

.player-badge {
    background: #3AAFFF;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    border: 2px solid #000;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.player-badge.host {
    background: linear-gradient(180deg, #FFB800 0%, #FF8C00 100%);
}

.player-badge.sheriff {
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
}

.player-badge.impostor {
    background: linear-gradient(180deg, #FF4444 0%, #C51111 100%);
}

.player-badge.crewmate {
    background: linear-gradient(180deg, #3AAFFF 0%, #1E4F9F 100%);
}

.kick-btn {
    background: linear-gradient(180deg, #FF4444 0%, #C51111 100%);
    color: white;
    border: 3px solid #000;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 rgba(0,0,0,0.5);
    position: relative;
    top: 0;
    font-family: 'Kalam', cursive;
    font-weight: bold;
}

.kick-btn:hover {
    top: 1px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.kick-btn:active {
    top: 3px;
    box-shadow: 0 0 0 rgba(0,0,0,0.5);
}

.lobby-info {
    text-align: center;
    margin: 20px 0;
    color: #a0a0b0;
    font-size: 1.1em;
}

.lobby-info .small {
    font-size: 0.95em;
    color: #7a7a8a;
}

/* Game Settings */
.game-settings {
    background: rgba(58, 64, 85, 0.4);
    border: 3px solid #3a4055;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.game-settings h3 {
    margin: 0 0 15px 0;
    text-align: center;
    color: #3AAFFF;
    font-size: 1.3em;
}

.settings-grid {
    display: grid;
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-item label {
    color: #ffffff;
    font-size: 1em;
    font-weight: bold;
}

.setting-item select {
    padding: 10px 15px;
    border: 3px solid #3a4055;
    border-radius: 10px;
    background: #1a1d3a;
    color: #ffffff;
    font-size: 1em;
    font-family: 'Kalam', cursive;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: #3AAFFF;
}

.lobby-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.round-info {
    background: linear-gradient(180deg, #C51111 0%, #8B0000 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    border: 3px solid #000;
    box-shadow: 
        0 4px 0 rgba(0,0,0,0.5),
        0 6px 15px rgba(197, 17, 17, 0.4);
    font-size: 1.2em;
}

.role-reveal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0e27;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

.role-reveal h2 {
    color: white;
    font-size: 3em;
    margin-bottom: 40px;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.8);
}

.role-text {
    font-size: 3.5em;
    font-weight: bold;
    margin-bottom: 50px;
    padding: 40px 80px;
    border-radius: 25px;
    border: 5px solid #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

.role-text.impostor {
    background: linear-gradient(180deg, #FF4444 0%, #C51111 100%);
    color: white;
}

.role-text.crewmate {
    background: linear-gradient(180deg, #3AAFFF 0%, #1E4F9F 100%);
    color: white;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.player-card {
    background: linear-gradient(135deg, #24273f 0%, #181a2e 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 4px solid #2a2d45;
    box-shadow: 
        0 4px 0 rgba(0,0,0,0.6),
        0 6px 15px rgba(0,0,0,0.4);
    position: relative;
    top: 0;
}

.player-card:hover {
    top: -3px;
    box-shadow: 
        0 7px 0 rgba(0,0,0,0.6),
        0 9px 20px rgba(0,0,0,0.5);
    border-color: #3a3d55;
}

.player-card.votable:hover {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #1d2d3a 0%, #101d2a 100%);
    box-shadow: 
        0 7px 0 rgba(74,144,226,0.6),
        0 0 25px rgba(74,144,226,0.4);
}

.player-card .player-color {
    width: 65px;
    height: 65px;
    margin: 0 auto 12px;
}

.player-card .player-name {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #ffffff;
}

.player-card .player-status {
    font-size: 0.9em;
    color: #a0a0b0;
}

.game-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

/* Voting Screen */
.voting-header {
    text-align: center;
    margin: -40px -40px 30px -40px;
    padding: 30px 40px;
    background: linear-gradient(180deg, #C51111 0%, #8B0000 100%);
    border-radius: 25px 25px 0 0;
    position: relative;
    overflow: hidden;
}

.voting-header::before,
.voting-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15px;
    background: repeating-linear-gradient(
        45deg,
        #FFD700,
        #FFD700 20px,
        #000 20px,
        #000 40px
    );
}

.voting-header::before {
    top: 0;
}

.voting-header::after {
    bottom: 0;
}

.voting-header h2 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.8);
    position: relative;
    z-index: 1;
}

.voting-header p {
    color: #FFD700;
    font-size: 1.2em;
    position: relative;
    z-index: 1;
    font-weight: bold;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

.voting-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.player-item.voted {
    border: 4px solid #3AAFFF;
    box-shadow: 0 0 20px rgba(58,175,255,0.3);
}

.vote-count {
    background: linear-gradient(180deg, #3AAFFF 0%, #1E4F9F 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    border: 2px solid #000;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.btn-mark-dead {
    background: linear-gradient(180deg, #FF4444 0%, #AA0000 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 15px;
    font-weight: bold;
    border: 2px solid #000;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-mark-dead:hover {
    background: linear-gradient(180deg, #FF6666 0%, #CC0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.5);
}

.btn-mark-dead:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

/* Game Over Screen */
.gameover-content {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(197,17,17,0.1) 0%, rgba(58,175,255,0.1) 100%);
    border-radius: 20px;
    border: 3px solid rgba(255,255,255,0.1);
}

.gameover-content h2 {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 
        4px 4px 0 rgba(0,0,0,0.8),
        0 0 30px currentColor;
}

.gameover-content h2.impostor-win {
    color: #FF4444;
}

.gameover-content h2.crewmate-win {
    color: #4A90E2;
}

.gameover-actions {
    margin-top: 30px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #24273f 0%, #181a2e 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 15px;
    box-shadow: 
        0 0 0 4px #000,
        0 8px 25px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 3px solid #2a2d45;
    display: none;
    animation: slideUp 0.3s ease-out;
    z-index: 2000;
    font-size: 1.2em;
    font-weight: bold;
}

.toast.show {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Color Classes */
.color-beige { background: #f5f5dc; border: 2px solid #999; }
.color-darkgrey { background: #4a4a4a; }
.color-salmonpink { background: #ff91a4; }
.color-armygreen { background: #4b5320; }
.color-brightfushia { background: #ff00ff; }
.color-red { background: #ff0000; }
.color-deepblue { background: #00008b; }
.color-orange { background: #ff8c00; }
.color-white { background: #ffffff; border: 2px solid #999; }
.color-lightcyan { background: #e0ffff; border: 2px solid #999; }
.color-skyblue { background: #87ceeb; }
.color-black { background: #1a1a1a; }
.color-neonyellow { background: #ffff00; border: 2px solid #999; }

/* Color Picker Modal */
.color-picker-btn {
    position: relative;
}

.color-picker-btn:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.8), 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* Voting Results Screen */
.voting-results-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.voting-results-content h2 {
    color: #1e3a5f;
    margin-bottom: 30px;
    font-size: 2em;
}

.vote-results-list {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.vote-result-item {
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-result-item .player-name {
    font-weight: bold;
}

.vote-result-item .vote-count {
    color: #e63946;
    font-weight: bold;
}

.ejection-result {
    background: #e63946;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.ejection-result.tie {
    background: #ffa500;
}

.ejection-result.no-votes {
    background: #6c757d;
}

.waiting-players {
    margin-top: 20px;
    color: #6c757d;
    font-style: italic;
}

.waiting-message {
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(58, 175, 255, 0.2);
    border: 2px solid #3AAFFF;
    border-radius: 15px;
    color: #3AAFFF;
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(58, 175, 255, 0.5);
    animation: pulse 2s infinite;
}

.waiting-message h3 {
    margin: 0 0 10px 0;
    color: #3AAFFF;
    font-size: 1.3em;
}

.acknowledgment-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acknowledgment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.acknowledgment-item .player-name {
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.acknowledgment-item .ack-status {
    font-weight: bold;
    font-size: 1em;
    padding: 5px 12px;
    border-radius: 8px;
}

.acknowledgment-item .ack-status.acknowledged {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
}

.acknowledgment-item .ack-status.waiting {
    color: #FFA726;
    background: rgba(255, 167, 38, 0.2);
    border: 2px solid #FFA726;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Custom Confirm Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

.modal-content {
    background: #1a1d3a;
    border-radius: 25px;
    padding: 35px;
    max-width: 450px;
    width: 90%;
    box-shadow: 
        0 0 0 6px #0d0f1f,
        0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 5px solid #3a4055;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 4em;
    display: inline-block;
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.modal-body {
    text-align: center;
    margin-bottom: 30px;
}

.modal-body p {
    color: #ffffff;
    font-size: 1.4em;
    line-height: 1.5;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-footer .btn {
    flex: 1;
    font-size: 1.1em;
    padding: 15px 25px;
}

/* Responsive */
/* Large tablets and small desktops */
@media (max-width: 900px) {
    .container {
        max-width: 90%;
    }
    
    .screen {
        padding: 30px;
    }
    
    .logo h1 {
        font-size: 3em;
    }
    
    .game-code-display {
        font-size: 1.6em;
        padding: 18px;
        letter-spacing: 4px;
    }
    
    .lobby-header h2 {
        font-size: 2.2em;
    }
    
    .player-name {
        font-size: 1.2em;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .screen {
        padding: 25px;
    }
    
    .logo h1 {
        font-size: 2.5em;
    }
    
    .logo p {
        font-size: 1em;
    }
    
    .game-code-display {
        font-size: 1.4em;
        padding: 15px;
        letter-spacing: 3px;
        gap: 10px;
    }
    
    .lobby-header h2 {
        font-size: 2em;
    }
    
    .player-item {
        padding: 15px;
        gap: 12px;
    }
    
    .player-color {
        width: 45px;
        height: 45px;
    }
    
    .player-name {
        font-size: 1.1em;
    }
    
    .player-badge {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn {
        font-size: 1em;
        padding: 12px 20px;
    }
}

/* Mobile devices */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .screen {
        padding: 20px;
        border-radius: 20px;
    }
    
    .logo h1 {
        font-size: 2em;
    }
    
    .logo p {
        font-size: 0.9em;
    }
    
    .game-code-display {
        font-size: 1.2em;
        padding: 12px;
        letter-spacing: 2px;
        flex-direction: column;
        gap: 8px;
    }
    
    .copy-btn {
        font-size: 1.1em;
        padding: 8px 12px;
    }
    
    .lobby-header h2 {
        font-size: 1.8em;
    }
    
    .player-item {
        padding: 12px;
        gap: 10px;
    }
    
    .player-color {
        width: 40px;
        height: 40px;
        border: 3px solid #000;
    }
    
    .player-name {
        font-size: 1em;
    }
    
    .player-badge {
        padding: 5px 10px;
        font-size: 0.8em;
    }
    
    .player-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .modal-content {
        padding: 25px;
    }
    
    .modal-icon {
        font-size: 3em;
    }
    
    .modal-body p {
        font-size: 1.2em;
    }
    
    .btn {
        font-size: 0.95em;
        padding: 10px 18px;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .form input, .form select {
        font-size: 1em;
        padding: 12px;
    }
}

/* Small mobile devices */
@media (max-width: 400px) {
    .screen {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 1.6em;
    }
    
    .game-code-display {
        font-size: 1em;
        padding: 10px;
        letter-spacing: 1px;
    }
    
    .lobby-header h2 {
        font-size: 1.5em;
    }
    
    .player-item {
        padding: 10px;
        gap: 8px;
    }
    
    .player-color {
        width: 35px;
        height: 35px;
    }
    
    .player-name {
        font-size: 0.95em;
    }
    
    .btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }
}

/* Sabotage overlay animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Camera screen fullscreen layout */
#camera-screen {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Override container for camera screen */
body:has(#camera-screen.active) .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

body:has(#camera-screen.active) {
    padding: 0 !important;
}
