/* Among Game - Main Stylesheet */
:root {
    --primary-color: #7c3aed;
    --bg-color: #0f0f14;
    --text-color: #e4e4e7;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow: hidden;
}

#app {
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#game-container {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0;
    left: 0;
    overflow: hidden;
}

#game-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   Profile Modal Styles
   ============================================ */

.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.profile-modal.hidden {
    display: none;
}

.profile-modal-content {
    background: linear-gradient(145deg, #1a1a2e, #1e1e32);
    border-radius: 20px;
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-modal-header h2 {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-modal-header h2 i {
    color: var(--primary-color);
}

.profile-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: #a0a0b0;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.profile-close-btn:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
    transform: rotate(90deg);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    padding: 0 1rem;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.profile-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.profile-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.profile-tab-content {
    display: none;
    padding: 1.5rem 2rem;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Avatar Section */
.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #9f67ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-username {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.profile-account-type {
    font-size: 0.85rem;
    color: #a0a0b0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-account-type.guest {
    color: #ffc107;
}

.profile-account-type.google {
    color: #4285f4;
}

/* Profile Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #a0a0b0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #606070;
}

.form-group textarea {
    resize: none;
    font-family: inherit;
}

.char-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 0.75rem;
    color: #606070;
}

.profile-save-btn {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #9f67ff);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* Stats Tab */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-card.win {
    border-color: rgba(46, 204, 113, 0.3);
}

.stat-card.loss {
    border-color: rgba(231, 76, 60, 0.3);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-card.win .stat-icon {
    color: #2ecc71;
}

.stat-card.loss .stat-icon {
    color: #e74c3c;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.85rem;
    color: #a0a0b0;
    margin-top: 0.25rem;
}

/* Role Stats */
.stats-roles h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.role-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-stat.crewmate {
    border-color: rgba(52, 152, 219, 0.3);
}

.role-stat.impostor {
    border-color: rgba(192, 57, 43, 0.3);
}

.role-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.role-stat.crewmate .role-icon {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.role-stat.impostor .role-icon {
    background: rgba(192, 57, 43, 0.2);
    color: #c0392b;
}

.role-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.role-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.role-wins {
    font-size: 0.85rem;
    color: #a0a0b0;
}

/* Appearance Tab */
.color-section h3,
.preview-section h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-hint {
    font-size: 0.85rem;
    color: #a0a0b0;
    margin-bottom: 1rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.color-option {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Player Preview */
.preview-section {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-top: 1rem;
}

.preview-character {
    width: 80px;
    height: 100px;
    background: var(--primary-color);
    border-radius: 50px 50px 30px 30px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.preview-character::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10px;
    width: 35px;
    height: 25px;
    background: rgba(155, 220, 255, 0.9);
    border-radius: 25px 25px 15px 15px;
    border: 3px solid rgba(0, 0, 0, 0.3);
}

.preview-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

/* Profile Footer */
.profile-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.profile-member-since {
    font-size: 0.85rem;
    color: #606070;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Profile Notification */
.profile-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 0 1rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-notification.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.profile-notification.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.profile-notification.info {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #3498db;
}

/* ============================================
   Reconnection Modal
   ============================================ */

#reconnect-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10001 !important;
    animation: fadeIn 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    min-width: unset !important;
    border-radius: 0 !important;
    border: none !important;
}

#reconnect-modal.hidden {
    display: none !important;
}

#reconnect-modal .modal-content,
#reconnect-modal .reconnect-modal-content {
    background: linear-gradient(145deg, #1a1a2e, #1e1e32) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
    animation: slideUp 0.3s ease;
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
}

/* Responsive */
@media (max-width: 600px) {
    .profile-modal-content {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .profile-modal-header,
    .profile-tab-content,
    .profile-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .profile-tab {
        font-size: 0.8rem;
        padding: 0.75rem 0.5rem;
    }

    .profile-tab span {
        display: none;
    }

    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Task System Styles
   ============================================ */

/* Task Panel - Left Side */
.task-panel {
    position: fixed;
    top: 100px;
    left: 20px;
    width: 280px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    z-index: 100;
    overflow: hidden;
    animation: slideInLeft 0.3s ease;
    transition: all 0.3s ease;
}

.task-panel.hidden {
    display: none;
}

.task-panel.collapsed {
    width: 200px;
}

.task-panel.collapsed .task-list {
    display: none;
}

.task-panel.collapsed .task-panel-header .task-toggle {
    transform: rotate(180deg);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-panel-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(59, 130, 246, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.task-panel-header:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(59, 130, 246, 0.3));
}

.task-panel-header .task-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-panel-header .task-icon {
    font-size: 1.1rem;
}

.task-panel-header .task-toggle {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.task-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin: 0.25rem 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-item.in_progress {
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.task-status-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-name {
    color: #fff;
    font-size: 0.9rem;
}

.task-location {
    color: #888;
    font-size: 0.75rem;
}

/* Task Prompt */
.task-prompt {
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    animation: fadeInUp 0.2s ease;
}

.task-prompt.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.task-prompt-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #fff;
}

.task-prompt-content kbd {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
}

/* Task Modal */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.task-modal.hidden {
    display: none;
}

.task-modal-content {
    background: linear-gradient(145deg, #1a1a2e, #1e1e32);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    border: 1px solid rgba(124, 58, 237, 0.3);
    animation: slideUp 0.3s ease;
}

.task-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.task-modal-header span {
    font-size: 3rem;
}

.task-modal-header h3 {
    color: #fff;
    font-size: 1.5rem;
}

.task-progress-container {
    margin: 1.5rem 0;
}

.task-progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 10px;
    transition: width 0.1s linear;
}

#task-time-remaining {
    display: block;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.task-animation-container {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.task-hint {
    color: #888;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Task Animations */
.task-anim {
    width: 100px;
    height: 100px;
    position: relative;
}

.task-anim.erase .board {
    width: 80px;
    height: 60px;
    background: #2d4a2d;
    border: 3px solid #4a7c4a;
    border-radius: 4px;
}

.task-anim.erase .eraser {
    position: absolute;
    width: 30px;
    height: 15px;
    background: #f5f5f5;
    border-radius: 2px;
    top: 20px;
    animation: eraseAnim 1s ease-in-out infinite;
}

@keyframes eraseAnim {

    0%,
    100% {
        left: 10px;
    }

    50% {
        left: 50px;
    }
}

.task-anim.books .book {
    position: absolute;
    width: 20px;
    height: 60px;
    border-radius: 2px;
    animation: bookAnim 1.5s ease-in-out infinite;
}

.task-anim.books .b1 {
    background: #ef4444;
    left: 20px;
    animation-delay: 0s;
}

.task-anim.books .b2 {
    background: #3b82f6;
    left: 45px;
    animation-delay: 0.3s;
}

.task-anim.books .b3 {
    background: #22c55e;
    left: 70px;
    animation-delay: 0.6s;
}

@keyframes bookAnim {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.task-anim.default .gear {
    width: 60px;
    height: 60px;
    border: 8px solid #888;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Role Reveal Modal */
.role-reveal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.role-reveal-modal.hidden {
    display: none;
}

.role-reveal-content {
    text-align: center;
}

.role-reveal-animation {
    perspective: 1000px;
}

.role-card {
    width: 300px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.role-card.flipped {
    transform: rotateY(180deg);
}

.role-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.role-card-front,
.role-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.role-card-front {
    background: linear-gradient(145deg, #1a1a2e, #2d2d44);
    border: 2px solid rgba(124, 58, 237, 0.5);
}

.role-card-front .mystery-icon {
    font-size: 5rem;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.role-card-front p {
    color: #888;
    margin-top: 1rem;
}

.role-card-back {
    background: linear-gradient(145deg, #1a1a2e, #2d2d44);
    border: 2px solid rgba(124, 58, 237, 0.5);
    transform: rotateY(180deg);
}

.role-card-back.crewmate {
    background: linear-gradient(145deg, #0d3320, #166534);
    border-color: #22c55e;
}

.role-card-back.impostor {
    background: linear-gradient(145deg, #450a0a, #7f1d1d);
    border-color: #ef4444;
}

.role-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.role-card-back h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.role-card-back p {
    color: rgba(255, 255, 255, 0.8);
}

.role-tasks-preview {
    margin-top: 2rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    max-width: 300px;
    animation: fadeIn 0.5s ease;
}

.role-tasks-preview.hidden {
    display: none;
}

.role-tasks-preview h4 {
    color: #22c55e;
    margin-bottom: 0.5rem;
}

.role-tasks-preview ul {
    list-style: none;
    color: #fff;
}

.role-tasks-preview li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Global Task Progress */
.global-task-progress {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
    cursor: pointer;
}

.global-task-progress.hidden {
    display: none;
}

.global-task-progress.compact {
    width: 200px;
    padding: 0.5rem 0.75rem;
}

.global-task-progress.compact .progress-header span:first-child {
    display: none;
}

.global-task-progress.compact .progress-header {
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

.global-task-progress.compact .progress-count {
    display: none;
}

.global-task-progress.compact .progress-toggle {
    transform: rotate(180deg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #fff;
}

.progress-header .progress-toggle {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

#progress-percentage {
    color: #22c55e;
    font-weight: bold;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-count {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #888;
}

/* Game End Modal */
.game-end-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    animation: fadeIn 0.5s ease;
}

.game-end-modal.hidden {
    display: none;
}

.game-end-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.game-end-banner {
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.game-end-banner.crewmate-win {
    background: linear-gradient(135deg, #166534, #22c55e);
}

.game-end-banner.impostor-win {
    background: linear-gradient(135deg, #7f1d1d, #ef4444);
}

.game-end-banner h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.game-end-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#game-end-reason {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.impostor-reveal {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.impostor-reveal h3 {
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.impostor-reveal-item {
    color: #fff;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.final-stats .stat {
    text-align: center;
}

.final-stats .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #22c55e;
}

.final-stats .stat-label {
    font-size: 0.85rem;
    color: #888;
}

/* Player Scoreboard */
.scoreboard-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.player-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scoreboard-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.scoreboard-row.winner {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.scoreboard-row.loser {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.scoreboard-row.is-me {
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

.scoreboard-row .rank {
    font-weight: bold;
    color: #888;
    min-width: 30px;
}

.scoreboard-row .player-name {
    flex: 1;
    color: #fff;
    font-weight: 500;
    text-align: left;
}

.scoreboard-row .player-status {
    font-size: 1.1rem;
    width: 25px;
}

.scoreboard-row .task-info {
    font-size: 0.85rem;
    color: #22c55e;
    min-width: 80px;
    text-align: right;
}

.scoreboard-row .task-info.impostor-info {
    color: #ef4444;
}

.scoreboard-row .won-badge {
    font-size: 1.2rem;
    animation: badgePulse 1s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Game End Buttons */
.game-end-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.game-end-content .btn-primary,
.game-end-content .btn-secondary {
    padding: 1rem 2rem;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-end-content .btn-primary {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.game-end-content .btn-secondary {
    background: linear-gradient(135deg, #4b5563, #374151);
}

.game-end-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.game-end-content .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(75, 85, 99, 0.4);
}

.game-end-content .btn-lobby span,
.game-end-content .btn-home span {
    font-size: 1.2rem;
}

/* Task Notification */
.task-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
    border-radius: 10px;
    font-weight: 500;
    z-index: 1000;
    animation: notificationIn 0.3s ease;
}

.task-notification.fade-out {
    animation: notificationOut 0.3s ease forwards;
}

@keyframes notificationIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes notificationOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ============================================
   KILL SYSTEM STYLES
   ============================================ */

/* Kill Button */
.kill-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    border: 4px solid #7f1d1d;
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
}

.kill-button.hidden {
    display: none;
}

.kill-button.ready {
    animation: killButtonPulse 1s ease-in-out infinite;
    transform: scale(1);
}

.kill-button.ready:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.7);
}

.kill-button.cooldown {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    border-color: #2a2a2a;
    cursor: not-allowed;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.kill-button.no-target {
    background: linear-gradient(145deg, #7f1d1d, #5c1414);
    opacity: 0.7;
    cursor: not-allowed;
}

.kill-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.kill-icon {
    font-size: 2rem;
}

.kill-text {
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.kill-button kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.kill-cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
}

.kill-cooldown-overlay.hidden {
    display: none;
}

@keyframes killButtonPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
    }

    50% {
        box-shadow: 0 8px 40px rgba(220, 38, 38, 0.8), 0 0 60px rgba(220, 38, 38, 0.4);
    }
}

/* ============================================
   SABOTAGE SYSTEM STYLES
   ============================================ */

/* Sabotage Button (near kill button) */
.sabotage-button {
    position: fixed;
    bottom: 210px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7c3aed, #6d28d9);
    border: 4px solid #5b21b6;
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
    color: white;
}

.sabotage-button.hidden {
    display: none;
}

.sabotage-button.ready {
    animation: sabotageButtonPulse 1s ease-in-out infinite;
}

.sabotage-button.ready:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.7);
}

.sabotage-button.cooldown {
    background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
    border-color: #2a2a2a;
    cursor: not-allowed;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sabotage-button.no-target {
    background: linear-gradient(145deg, #5b21b6, #4c1d95);
    opacity: 0.7;
    cursor: not-allowed;
}

.sabotage-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sabotage-button .sabotage-icon {
    font-size: 1.5rem;
}

.sabotage-button .sabotage-text {
    font-size: 0.55rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.sabotage-button kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.sabotage-cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%;
}

.sabotage-cooldown-overlay.hidden {
    display: none;
}

@keyframes sabotageButtonPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    }

    50% {
        box-shadow: 0 8px 40px rgba(124, 58, 237, 0.8), 0 0 60px rgba(124, 58, 237, 0.4);
    }
}

/* Sabotage Prompt */
.sabotage-prompt {
    position: fixed;
    bottom: 300px;
    right: 30px;
    background: rgba(124, 58, 237, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #7c3aed;
    z-index: 899;
    color: white;
    animation: sabotagePromptPulse 1.5s ease-in-out infinite;
}

.sabotage-prompt.hidden {
    display: none;
}

.sabotage-prompt-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes sabotagePromptPulse {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
    }
}

/* Sabotage Modal (progress bar while sabotaging) */
.sabotage-modal {
    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: 10001;
}

.sabotage-modal.hidden {
    display: none;
}

.sabotage-modal-content {
    background: linear-gradient(145deg, #1e1e2e, #2a2a3e);
    border: 3px solid #7c3aed;
    border-radius: 20px;
    padding: 2rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.4);
    animation: sabotageModalIn 0.3s ease;
}

@keyframes sabotageModalIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sabotage-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sabotage-modal-icon {
    font-size: 2.5rem;
}

.sabotage-modal-header h3 {
    font-size: 1.5rem;
    color: #a78bfa;
    margin: 0;
}

.sabotage-progress-container {
    margin: 1.5rem 0;
}

.sabotage-progress-bar {
    width: 300px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.sabotage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 8px;
    transition: width 0.1s linear;
}

#sabotage-time-remaining {
    color: #a78bfa;
    font-size: 1.2rem;
    font-weight: bold;
}

.sabotage-hint {
    color: #888;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.sabotage-modal .btn-cancel {
    background: linear-gradient(145deg, #4b5563, #374151);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s;
}

.sabotage-modal .btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Kill Notification */
.kill-notification {
    position: fixed;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 1100;
    animation: killNotificationIn 0.5s ease;
}

.kill-notification.hidden {
    display: none;
}

.kill-notification.default {
    background: rgba(220, 38, 38, 0.9);
    border: 2px solid #b91c1c;
}

.kill-notification.killer {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
    border: 2px solid #7f1d1d;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.6);
}

.kill-notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kill-notification-icon {
    font-size: 1.5rem;
}

@keyframes killNotificationIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Dead Overlay (when you are killed) */
.dead-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
    transition: background 1s ease;
}

.dead-overlay.hidden {
    display: none;
}

.dead-overlay.visible {
    background: rgba(0, 0, 0, 0.4);
}

.dead-content {
    text-align: center;
    color: #fff;
    animation: deadFadeIn 1.5s ease forwards;
    opacity: 0;
}

.dead-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: ghostFloat 3s ease-in-out infinite;
}

.dead-content h2 {
    font-size: 2.5rem;
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    margin-bottom: 0.5rem;
}

.dead-content p {
    font-size: 1.1rem;
    color: #a1a1aa;
}

@keyframes deadFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ghostFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Target Indicator */
.target-indicator {
    position: fixed;
    bottom: 210px;
    right: 30px;
    background: rgba(220, 38, 38, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #b91c1c;
    z-index: 899;
    animation: targetPulse 1.5s ease-in-out infinite;
}

.target-indicator.hidden {
    display: none;
}

.target-indicator::before {
    content: '🎯 ';
}

@keyframes targetPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Ghost Label (shows when player is dead) */
.ghost-label {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(147, 51, 234, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    border: 2px solid #9333ea;
    z-index: 1500;
    animation: ghostLabelFloat 2s ease-in-out infinite;
}

@keyframes ghostLabelFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   REPORT BUTTON & UI
   ============================================ */
.report-button {
    position: fixed;
    bottom: 180px;
    left: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f97316, #ea580c);
    border: 4px solid #c2410c;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.5);
    animation: reportButtonPulse 1.5s ease-in-out infinite;
    transition: transform 0.2s, box-shadow 0.2s;
}

.report-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(249, 115, 22, 0.7);
}

.report-button.hidden {
    display: none;
}

.report-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.report-icon {
    font-size: 2rem;
}

.report-text {
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.report-button kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

@keyframes reportButtonPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(249, 115, 22, 0.5);
    }

    50% {
        box-shadow: 0 8px 40px rgba(249, 115, 22, 0.8), 0 0 60px rgba(249, 115, 22, 0.4);
    }
}

.report-prompt {
    position: fixed;
    bottom: 270px;
    left: 30px;
    background: rgba(249, 115, 22, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #c2410c;
    z-index: 899;
}

.report-prompt.hidden {
    display: none;
}

.report-prompt-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.body-icon {
    font-size: 1.2rem;
}

/* ============================================
   EMERGENCY BUTTON & UI
   ============================================ */
.emergency-button {
    position: fixed;
    bottom: 280px;
    left: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #eab308, #ca8a04);
    border: 4px solid #a16207;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.5);
    animation: emergencyButtonPulse 1.5s ease-in-out infinite;
    transition: transform 0.2s, box-shadow 0.2s;
}

.emergency-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(234, 179, 8, 0.7);
}

.emergency-button.hidden {
    display: none;
}

.emergency-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.emergency-icon {
    font-size: 2rem;
}

.emergency-text {
    font-size: 0.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.emergency-button kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

@keyframes emergencyButtonPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(234, 179, 8, 0.5);
    }

    50% {
        box-shadow: 0 8px 40px rgba(234, 179, 8, 0.8), 0 0 60px rgba(234, 179, 8, 0.4);
    }
}

.emergency-prompt {
    position: fixed;
    bottom: 370px;
    left: 30px;
    background: rgba(234, 179, 8, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #a16207;
    z-index: 899;
    color: #1e1e1e;
}

.emergency-prompt.hidden {
    display: none;
}

.emergency-prompt-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.diretoria-icon {
    font-size: 1.2rem;
}

/* ============================================
   VOTING MODAL
   ============================================ */
.voting-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.voting-modal.hidden {
    display: none;
}

.voting-content {
    background: linear-gradient(145deg, #1e1e32, #252540);
    border-radius: 20px;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(249, 115, 22, 0.2);
    border: 2px solid rgba(249, 115, 22, 0.4);
}

.voting-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.voting-header h2 {
    font-size: 2rem;
    color: #f97316;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.voting-header p {
    color: #a1a1aa;
    font-size: 1rem;
}

.voting-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.voting-timer .timer-icon {
    font-size: 1.2rem;
}

#voting-time {
    color: #fbbf24;
    min-width: 24px;
    transition: color 0.3s;
}

#voting-time.urgent {
    color: #ef4444;
    animation: urgentPulse 0.5s ease-in-out infinite;
}

@keyframes urgentPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.voting-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    border-left: 4px solid #f97316;
}

.voting-info p {
    color: #e4e4e7;
    font-size: 1rem;
}

.voting-info strong {
    color: #fbbf24;
}

/* Ghost status banner for dead players during voting */
.ghost-voting-status {
    background: linear-gradient(145deg, rgba(147, 51, 234, 0.4), rgba(126, 34, 206, 0.4));
    border: 2px solid #9333ea;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #e9d5ff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: ghostBannerPulse 2s ease-in-out infinite;
}

.ghost-voting-status.hidden {
    display: none;
}

.ghost-voting-status .ghost-icon {
    font-size: 1.5rem;
    animation: ghostFloat 2s ease-in-out infinite;
}

@keyframes ghostBannerPulse {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 1;
    }
}

.skip-vote-btn.disabled-ghost {
    opacity: 0.4;
    cursor: not-allowed;
}

.voting-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.voting-card {
    background: rgba(30, 30, 50, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: default;
    transition: all 0.2s ease;
}

.voting-card.votable {
    cursor: pointer;
}

.voting-card.votable:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.voting-card.selected {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.voting-card.dead {
    opacity: 0.5;
    filter: grayscale(50%);
}

.voting-card.is-me {
    border-color: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6b7280;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.voting-card .player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.voting-card .player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e4e4e7;
}

.vote-indicator {
    font-size: 0.8rem;
    color: #6b7280;
    min-height: 20px;
}

.vote-indicator.voted {
    color: #22c55e;
}

.vote-count {
    font-size: 0.75rem;
    color: #fbbf24;
    margin-top: 4px;
    min-height: 16px;
}

.voting-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.skip-vote-btn {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    border: 2px solid #374151;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skip-vote-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #9ca3af, #6b7280);
    transform: translateY(-2px);
}

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

.skip-vote-btn.selected {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border-color: #15803d;
}

.voting-status {
    text-align: center;
    color: #a1a1aa;
    font-size: 0.9rem;
}

/* ============================================
   VOTE RESULT MODAL
   ============================================ */
.vote-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3100;
    animation: fadeIn 0.3s ease;
}

.vote-result-modal.hidden {
    display: none;
}

.vote-result-content {
    text-align: center;
    animation: voteResultIn 0.5s ease;
}

.vote-result-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: rocketLaunch 2s ease-in-out;
}

@keyframes rocketLaunch {
    0% {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }

    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes voteResultIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vote-result-content h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.vote-result-content p {
    font-size: 1.2rem;
    color: #a1a1aa;
    margin-bottom: 1.5rem;
}

.vote-result-role {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: bold;
    animation: roleRevealPulse 1s ease-in-out infinite;
}

.vote-result-role.hidden {
    display: none;
}

.vote-result-role .impostor {
    background: linear-gradient(145deg, #dc2626, #991b1b);
    color: white;
    border: 2px solid #7f1d1d;
}

.vote-result-role .crewmate {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
    border: 2px solid #1e40af;
}

@keyframes roleRevealPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    }
}

/* ============================================
   VENT BUTTON & UI (Impostor only)
   ============================================ */
.vent-button {
    position: fixed;
    bottom: 310px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9333ea, #7c3aed);
    border: 4px solid #6b21a8;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.5);
    animation: ventButtonPulse 1.5s ease-in-out infinite;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.vent-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.7);
}

.vent-button.hidden {
    display: none;
}

.vent-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.vent-icon {
    font-size: 1.8rem;
}

.vent-text {
    font-size: 0.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.vent-button kbd {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.vent-cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50%;
}

.vent-cooldown-overlay.active {
    display: flex;
}

@keyframes ventButtonPulse {

    0%,
    100% {
        box-shadow: 0 8px 30px rgba(147, 51, 234, 0.5);
    }

    50% {
        box-shadow: 0 8px 40px rgba(147, 51, 234, 0.8), 0 0 60px rgba(147, 51, 234, 0.4);
    }
}

.vent-prompt {
    position: fixed;
    bottom: 190px;
    left: 30px;
    background: rgba(147, 51, 234, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #6b21a8;
    z-index: 899;
    color: white;
}

.vent-prompt.hidden {
    display: none;
}

.vent-prompt-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   MOBILE JOYSTICK CONTROLS
   ============================================ */
#mobile-joystick {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 950;
    touch-action: none;
}

#mobile-joystick.hidden {
    display: none;
}

.joystick-base {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.joystick-knob {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #7c3aed, #5b21b6);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.5);
    transition: transform 0.05s ease-out;
}

.joystick-knob.active {
    background: linear-gradient(145deg, #9f67ff, #7c3aed);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.7);
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {

    /* Task Panel - Smaller and collapsed by default */
    .task-panel {
        width: 200px;
        left: 10px;
        top: 70px;
        font-size: 0.85rem;
    }

    .task-panel.mobile-collapsed {
        width: 150px;
    }

    .task-panel.mobile-collapsed .task-list {
        display: none;
    }

    .task-panel-header {
        padding: 0.5rem 0.75rem;
    }

    .task-list {
        max-height: 200px;
        padding: 0.25rem;
    }

    .task-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .task-name {
        font-size: 0.8rem;
    }

    .task-location {
        font-size: 0.65rem;
    }

    /* Minimap - Smaller on mobile */
    #minimap-container {
        width: 100px;
        height: 100px;
        bottom: 160px;
        left: 10px;
        border-width: 2px;
    }

    #minimap-container .minimap-header {
        font-size: 8px;
        padding: 4px;
    }

    #minimap-container .expand-hint {
        display: none;
    }

    #minimap-container.expanded {
        width: 300px;
        height: 300px;
    }

    /* Global Task Progress - Compact */
    .global-task-progress {
        width: 180px;
        padding: 0.5rem 0.75rem;
        top: 10px;
    }

    .progress-header {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .progress-count {
        font-size: 0.65rem;
    }

    /* Location Indicator - Smaller */
    #location-indicator {
        top: 50px;
        padding: 6px 14px;
        font-size: 12px;
        gap: 6px;
    }

    #location-indicator .room-dot {
        width: 8px;
        height: 8px;
    }

    #location-indicator .room-name {
        min-width: 80px;
    }

    /* Controls Hint - Hidden on mobile (keyboard only) */
    #controls-hint {
        display: none !important;
    }

    /* Debug Info - Smaller and repositioned */
    #debug-info {
        bottom: 270px;
        left: 10px;
        font-size: 10px;
        padding: 4px 8px;
    }

    /* User Menu - Smaller */
    #user-menu {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .user-info {
        padding: 6px 10px 6px 6px;
        gap: 8px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .user-name {
        font-size: 12px;
        max-width: 80px;
    }

    .user-menu-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Kill Button - Repositioned for mobile */
    .kill-button {
        bottom: 30px;
        right: 20px;
        width: 70px;
        height: 70px;
    }

    .kill-btn-content .kill-icon {
        font-size: 1.5rem;
    }

    .kill-btn-content .kill-text {
        font-size: 0.4rem;
    }

    /* Target Indicator - Closer to kill button on mobile */
    .target-indicator {
        bottom: 110px;
        right: 15px;
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    /* Vent Button - Repositioned for mobile */
    .vent-button {
        bottom: 160px;
        left: 140px;
        width: 60px;
        height: 60px;
    }

    .vent-icon {
        font-size: 1.4rem;
    }

    .vent-text {
        font-size: 0.4rem;
    }

    .vent-button kbd {
        display: none;
    }

    /* Task Prompt - Higher on mobile */
    .task-prompt {
        bottom: 180px;
    }

    .task-prompt-content {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Modals - Full width on mobile */
    .modal {
        width: 95%;
        min-width: unset;
        max-width: 95%;
        padding: 20px;
    }

    .modal h2 {
        font-size: 20px;
    }

    .modal-large {
        min-width: unset;
        max-width: 95%;
    }

    /* Task Modal */
    .task-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 1.5rem;
    }

    .task-modal-header span {
        font-size: 2rem;
    }

    .task-modal-header h3 {
        font-size: 1.2rem;
    }

    .task-animation-container {
        height: 100px;
    }

    /* Role Reveal */
    .role-card {
        width: 250px;
        height: 340px;
    }

    .role-emoji {
        font-size: 3.5rem;
    }

    .role-card-back h2 {
        font-size: 1.5rem;
    }

    /* Game End Modal */
    .game-end-modal {
        overflow-y: auto;
        padding: 10px;
    }

    .game-end-content {
        padding: 1rem;
        max-height: 85vh;
        overflow-y: auto;
        width: 95%;
        max-width: 350px;
    }

    .game-end-banner {
        padding: 0.75rem;
    }

    .game-end-banner h1 {
        font-size: 1.5rem;
    }

    .game-end-details {
        padding: 0.75rem;
    }

    #game-end-reason {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .impostor-reveal h3 {
        font-size: 0.9rem;
    }

    .impostor-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .scoreboard-section h3 {
        font-size: 0.9rem;
    }

    .player-scoreboard {
        max-height: 25vh;
        overflow-y: auto;
    }

    .scoreboard-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .final-stats {
        padding: 0.5rem;
    }

    .final-stats .stat-value {
        font-size: 1.5rem;
    }

    .final-stats .stat-label {
        font-size: 0.7rem;
    }

    .game-end-buttons {
        gap: 0.5rem;
        flex-direction: column;
    }

    .game-end-content .btn-primary,
    .game-end-content .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
    }

    /* Voting Modal */
    .voting-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 1rem;
    }

    .players-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .player-vote-card {
        padding: 0.5rem;
    }

    .vote-avatar {
        width: 40px;
        height: 50px;
    }

    .vote-name {
        font-size: 0.7rem;
    }

    /* Report Modal */
    .report-modal-content {
        width: 95%;
        max-width: 95%;
    }

    /* Kill Notification - Mobile */
    .kill-notification {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .kill-notification-icon {
        font-size: 1.5rem;
    }

    /* Dead Overlay - Mobile */
    .dead-overlay .dead-content {
        padding: 1.5rem;
    }

    .dead-overlay .dead-icon {
        font-size: 3rem;
    }

    .dead-overlay .dead-content h2 {
        font-size: 1.3rem;
    }

    .dead-overlay .dead-content p {
        font-size: 0.9rem;
    }

    /* Vote Result Modal - Mobile */
    .vote-result-content {
        padding: 1.5rem;
        min-width: unset;
        width: 90%;
        max-width: 320px;
    }

    .vote-result-icon {
        font-size: 3rem;
    }

    .vote-result-content h2 {
        font-size: 1.3rem;
    }

    .vote-result-content p {
        font-size: 0.9rem;
    }

    /* Voting Header - Mobile */
    .voting-header h2 {
        font-size: 1.2rem;
    }

    .voting-header p {
        font-size: 0.85rem;
    }

    .voting-timer {
        font-size: 1rem;
    }

    .voting-actions .skip-vote-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Lobby/Join Modals - Mobile */
    .modal {
        width: 90% !important;
        min-width: unset !important;
        max-width: 350px !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        padding: 1.25rem !important;
    }

    #lobby-select-modal {
        max-height: 85vh;
        overflow-y: auto;
    }

    #lobby-list {
        max-height: 30vh;
        overflow-y: auto;
    }

    .lobby-item {
        padding: 10px !important;
        margin-bottom: 6px !important;
    }

    .lobby-item .lobby-code {
        font-size: 0.9rem;
    }

    .lobby-item .lobby-host,
    .lobby-item .lobby-players {
        font-size: 0.75rem;
    }

    .modal h2 {
        font-size: 1.4rem;
    }

    .modal p {
        font-size: 0.85rem;
    }

    .modal input[type="text"] {
        font-size: 1rem;
        padding: 0.6rem 0.75rem;
    }

    .modal button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Lobby Player List - Mobile */
    .lobby-modal .player-list {
        max-height: 200px;
        gap: 0.5rem;
    }

    .lobby-modal .player-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .lobby-modal .lobby-code {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }

    .lobby-modal .copy-code-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* Lobby Room Modal - Scrollable on mobile */
    .modal-large {
        max-height: 85vh !important;
        overflow-y: auto !important;
        padding-bottom: 1rem !important;
    }

    #lobby-room-modal {
        max-height: 85vh;
        overflow-y: auto;
    }

    #lobby-players-list {
        max-height: 35vh;
        overflow-y: auto;
        margin-bottom: 16px;
    }

    .player-item {
        padding: 8px 10px !important;
        margin-bottom: 6px !important;
    }

    .player-color {
        width: 20px !important;
        height: 20px !important;
    }

    .player-name {
        font-size: 0.85rem;
    }

    .lobby-header {
        margin-bottom: 16px !important;
    }

    .lobby-header h2 {
        font-size: 1.2rem;
    }

    .lobby-actions {
        flex-direction: column;
        gap: 8px;
    }

    .lobby-actions button {
        width: 100%;
        padding: 0.6rem !important;
        font-size: 0.9rem !important;
    }

    /* Meeting/Report Start Animation - Mobile */
    .meeting-animation {
        font-size: 3rem;
    }

    .report-animation-content h2 {
        font-size: 1.3rem;
    }

    /* HIDE UI ELEMENTS ON MOBILE FOR CLEANER VIEW */
    #location-indicator {
        display: none !important;
    }

    #debug-info {
        display: none !important;
    }

    .global-task-progress {
        display: none !important;
    }

    .task-panel {
        display: none !important;
    }

    #minimap-container {
        display: none !important;
    }

    /* User menu - more compact */
    .user-info .user-name {
        display: none;
    }

    /* Show task prompt as touch-friendly button on mobile */
    .task-prompt {
        bottom: 120px;
        right: 20px;
        left: auto;
        transform: none;
    }

    .task-prompt-content kbd {
        display: none;
    }

    /* ===== WHEN HUD TOGGLE IS ACTIVE ===== */
    body.mobile-hud-visible .task-panel {
        display: block !important;
        width: 85% !important;
        max-width: 320px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 50px !important;
        max-height: 50vh !important;
        border-radius: 12px !important;
        z-index: 500 !important;
    }

    body.mobile-hud-visible .task-panel .task-panel-header {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }

    body.mobile-hud-visible .task-panel .task-list {
        display: block !important;
        max-height: 40vh !important;
        padding: 0.5rem !important;
        overflow-y: auto !important;
    }

    body.mobile-hud-visible .task-panel .task-item {
        display: flex !important;
        padding: 0.6rem 0.75rem !important;
        margin-bottom: 0.4rem !important;
        border-radius: 8px !important;
    }

    body.mobile-hud-visible .task-panel .task-name {
        font-size: 0.85rem !important;
    }

    body.mobile-hud-visible .task-panel .task-location {
        font-size: 0.7rem !important;
    }

    body.mobile-hud-visible .global-task-progress {
        display: block !important;
        width: 85% !important;
        max-width: 320px !important;
        top: auto !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 500 !important;
    }
}

/* ============================================
   MOBILE ACTION BUTTON
   ============================================ */
.mobile-action-btn {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border: 3px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 950;
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.mobile-action-btn.hidden {
    display: none !important;
}

.mobile-action-btn:active {
    transform: scale(0.95);
    box-shadow: 0 3px 15px rgba(34, 197, 94, 0.6);
}

.mobile-action-btn .action-icon {
    font-size: 1.5rem;
}

.mobile-action-btn .action-text {
    font-size: 0.5rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.5px;
}

/* ============================================
   MOBILE HUD TOGGLE
   ============================================ */
.mobile-hud-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 960;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.mobile-hud-toggle.hidden {
    display: none !important;
}

.mobile-hud-toggle:active {
    transform: scale(0.9);
}

.mobile-hud-toggle.hud-visible {
    background: rgba(124, 58, 237, 0.6);
    border-color: rgba(124, 58, 237, 0.5);
}

/* Extra small devices - iPhone 13 mini (375x812) */
@media (max-width: 480px) {

    /* === HIDE NON-ESSENTIAL ELEMENTS === */
    #status-bar,
    #minimap-container,
    #debug-info,
    #controls-hint {
        display: none !important;
    }

    /* === TOP ZONE === */
    /* HUD Toggle - Top Left */
    .mobile-hud-toggle {
        top: 10px;
        left: 10px;
        bottom: auto;
        right: auto;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* Location Indicator - Top Center, Compact */
    #location-indicator {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 12px;
        font-size: 10px;
        gap: 4px;
    }

    #location-indicator .room-dot {
        width: 6px;
        height: 6px;
    }

    #location-indicator .room-name {
        min-width: auto;
    }

    /* User Menu - Top Right, Compact */
    #user-menu {
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .user-info {
        padding: 4px;
        gap: 0;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }

    .user-menu-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* === LEFT SIDE === */
    /* Task Panel - Compact and higher */
    .task-panel {
        top: 55px;
        left: 10px;
        width: 160px;
        font-size: 0.75rem;
    }

    .task-panel.mobile-collapsed {
        width: 130px;
    }

    /* === RIGHT SIDE === */
    /* Audio Panel - Vertical, mid-right */
    .audio-panel {
        top: 50%;
        bottom: auto;
        right: 8px;
        transform: translateY(-50%);
        flex-direction: column;
        padding: 6px;
        gap: 4px;
    }

    .audio-btn {
        padding: 6px;
        min-width: 36px;
        min-height: 36px;
    }

    .audio-btn i {
        font-size: 14px;
    }

    .audio-label {
        display: none;
    }

    /* === BOTTOM ZONE === */
    /* Joystick - Bottom Left */
    .joystick-base {
        width: 100px;
        height: 100px;
    }

    .joystick-knob {
        width: 40px;
        height: 40px;
    }

    #mobile-joystick {
        bottom: 20px;
        left: 15px;
    }

    /* Action Button - Bottom Right (above kill button area) */
    .mobile-action-btn {
        width: 60px;
        height: 60px;
        bottom: 90px;
        right: 15px;
    }

    .mobile-action-btn .action-icon {
        font-size: 1.2rem;
    }

    .mobile-action-btn .action-text {
        font-size: 8px;
    }

    /* Kill Button - Bottom Right */
    .kill-button {
        width: 60px;
        height: 60px;
        right: 15px;
        bottom: 20px;
    }

    /* Vent Button - Above joystick */
    .vent-button {
        width: 50px;
        height: 50px;
        left: 130px;
        bottom: 20px;
    }

    /* Task Prompt - Above action buttons */
    .task-prompt {
        bottom: 160px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 200px;
    }

    .task-prompt-content {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Global Progress - Bottom center, compact */
    .global-task-progress {
        top: auto;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 150px;
        padding: 4px 8px;
    }

    .progress-header {
        font-size: 0.65rem;
    }

    .progress-count {
        font-size: 0.6rem;
    }
}

/* iPad / Tablet (820x1180) */
@media (min-width: 481px) and (max-width: 1024px) {

    /* Status bar - Keep visible but compact */
    #status-bar {
        top: 15px;
        left: 15px;
        gap: 6px;
    }

    #connection-status .status-icon {
        width: 28px;
        height: 28px;
    }

    /* Minimap - Smaller */
    #minimap-container {
        width: 120px;
        height: 120px;
        bottom: 15px;
        left: 15px;
    }

    /* Audio Panel - Vertical right side */
    .audio-panel {
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
    }

    .audio-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .audio-label {
        display: none;
    }

    /* Task Panel */
    .task-panel {
        width: 180px;
        top: 65px;
    }

    /* User menu */
    #user-menu {
        top: 15px;
        right: 15px;
    }
}

```