/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Star Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent),
        radial-gradient(2px 2px at 10% 20%, white, transparent),
        radial-gradient(1px 1px at 40% 10%, white, transparent),
        radial-gradient(2px 2px at 70% 40%, white, transparent),
        radial-gradient(1px 1px at 25% 60%, white, transparent),
        radial-gradient(2px 2px at 85% 80%, white, transparent),
        radial-gradient(1px 1px at 45% 25%, white, transparent),
        radial-gradient(1px 1px at 95% 35%, white, transparent),
        radial-gradient(2px 2px at 5% 50%, white, transparent),
        radial-gradient(1px 1px at 65% 15%, white, transparent),
        radial-gradient(1px 1px at 30% 45%, white, transparent),
        radial-gradient(2px 2px at 75% 85%, white, transparent),
        radial-gradient(1px 1px at 55% 90%, white, transparent),
        radial-gradient(1px 1px at 12% 75%, white, transparent),
        radial-gradient(2px 2px at 88% 25%, white, transparent),
        radial-gradient(1px 1px at 35% 5%, white, transparent),
        radial-gradient(1px 1px at 92% 50%, white, transparent),
        radial-gradient(2px 2px at 18% 65%, white, transparent),
        radial-gradient(1px 1px at 48% 80%, white, transparent),
        radial-gradient(1px 1px at 72% 55%, white, transparent),
        radial-gradient(2px 2px at 8% 40%, white, transparent),
        radial-gradient(1px 1px at 58% 35%, white, transparent),
        radial-gradient(1px 1px at 22% 15%, white, transparent),
        radial-gradient(2px 2px at 82% 95%, white, transparent),
        radial-gradient(1px 1px at 38% 68%, white, transparent),
        radial-gradient(1px 1px at 68% 8%, white, transparent),
        radial-gradient(2px 2px at 42% 92%, white, transparent),
        radial-gradient(1px 1px at 78% 45%, white, transparent),
        radial-gradient(1px 1px at 28% 88%, white, transparent),
        radial-gradient(2px 2px at 52% 62%, white, transparent),
        radial-gradient(1px 1px at 97% 72%, white, transparent),
        radial-gradient(1px 1px at 14% 32%, white, transparent),
        radial-gradient(2px 2px at 62% 18%, white, transparent),
        radial-gradient(1px 1px at 3% 85%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: stars 120s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes stars {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, rgba(197, 17, 17, 0.2) 0%, transparent 100%);
}

.hero-content {
    animation: fadeInDown 1s ease-out;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(197, 17, 17, 0.8),
                 0 0 40px rgba(197, 17, 17, 0.6),
                 0 4px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logo-icon {
    filter: drop-shadow(0 0 10px rgba(197, 17, 17, 0.8));
    animation: float 3s ease-in-out infinite;
}

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

.tagline {
    font-size: 1.5rem;
    color: #7DC7FF;
    text-shadow: 0 0 10px rgba(125, 199, 255, 0.5);
    margin-bottom: 2rem;
}

/* Role Toggle */
.role-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.role-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: 3px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.role-btn[data-role="crewmate"] {
    background: rgba(0, 255, 255, 0.2);
    color: #00FFFF;
    border-color: #00FFFF;
}

.role-btn[data-role="impostor"] {
    background: rgba(197, 17, 17, 0.2);
    color: #FF6B6B;
    border-color: #C51111;
}

.role-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 30px currentColor;
}

.role-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px currentColor;
}

/* Game Overview */
.game-overview {
    padding: 4rem 0;
}

.game-overview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.overview-content p {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(125, 199, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 199, 255, 0.6);
    box-shadow: 0 10px 30px rgba(125, 199, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: #00FFFF;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.stat-label {
    font-size: 1.1rem;
    color: #cccccc;
    margin-top: 0.5rem;
}

/* Roles Section */
.roles-section {
    padding: 4rem 0;
}

.roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.role-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 2.5rem;
    border: 3px solid;
    transition: all 0.5s ease;
    opacity: 0.6;
    transform: scale(0.95);
    backdrop-filter: blur(10px);
}

.role-card.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 40px currentColor;
}

.crewmate-role {
    border-color: #00FFFF;
}

.impostor-role {
    border-color: #C51111;
}

.role-header {
    text-align: center;
    margin-bottom: 2rem;
}

.character-icon {
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    margin-bottom: 1rem;
}

.role-header h3 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

.crewmate-role h3 {
    color: #00FFFF;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.impostor-role h3 {
    color: #FF6B6B;
    text-shadow: 0 0 20px rgba(197, 17, 17, 0.5);
}

.role-description h4 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #7DC7FF;
}

.role-description ul {
    list-style: none;
    padding-left: 0;
}

.role-description li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.role-description li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00FFFF;
    font-weight: bold;
}

.impostor-role .role-description li::before {
    color: #FF6B6B;
}

/* Tasks Section */
.tasks-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.tasks-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 3rem;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.task-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-5px);
    border-color: #00FF00;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    background: rgba(0, 255, 0, 0.05);
}

.task-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.task-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.task-card p {
    font-size: 0.95rem;
    color: #cccccc;
}

/* Task Progress */
.task-progress {
    max-width: 600px;
    margin: 3rem auto 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 0, 0.3);
}

.task-progress h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #00FF00;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 0, 0.5);
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00FF00, #00CC00);
    width: 0%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.complete-task-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(0, 255, 0, 0.2);
    color: #00FF00;
    border: 3px solid #00FF00;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.complete-task-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.3);
}

/* Emergency Meeting */
.meeting-section {
    padding: 4rem 0;
}

.meeting-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #FF0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.meeting-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.meeting-info ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.meeting-info li {
    padding: 0.7rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.meeting-info li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    color: #FF0000;
}

.meeting-button-container {
    text-align: center;
}

.emergency-button {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, #FF0000 0%, #CC0000 50%, #990000 100%);
    border: 8px solid #660000;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.4),
                inset 0 -10px 30px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 10px 40px rgba(255, 0, 0, 0.4), inset 0 -10px 30px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 10px 60px rgba(255, 0, 0, 0.8), inset 0 -10px 30px rgba(0, 0, 0, 0.5); }
}

.emergency-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 60px rgba(255, 0, 0, 0.7),
                inset 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.emergency-button:active {
    transform: scale(0.95);
}

.emergency-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

/* Tips Section */
.tips-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.tips-container {
    position: relative;
}

.tips-card {
    opacity: 0;
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.tips-card.active {
    opacity: 1;
    display: block;
}

.tips-card h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.crewmate-tips h2 {
    color: #00FFFF;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.impostor-tips h2 {
    color: #FF6B6B;
    text-shadow: 0 0 20px rgba(197, 17, 17, 0.5);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tip {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.crewmate-tips .tip:hover {
    border-color: #00FFFF;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    transform: translateY(-5px);
}

.impostor-tips .tip:hover {
    border-color: #C51111;
    box-shadow: 0 10px 30px rgba(197, 17, 17, 0.2);
    transform: translateY(-5px);
}

.tip h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.tip p {
    color: #cccccc;
    line-height: 1.6;
}

/* Maps Section */
.maps-section {
    padding: 4rem 0;
}

.maps-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.map-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(125, 199, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.map-card:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 199, 255, 0.6);
    box-shadow: 0 10px 30px rgba(125, 199, 255, 0.2);
}

.map-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #7DC7FF;
}

.map-card p {
    color: #cccccc;
    margin-bottom: 1rem;
}

.map-tag {
    display: inline-block;
    background: rgba(0, 255, 255, 0.2);
    color: #00FFFF;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #00FFFF;
}

/* Colors Section */
.colors-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.colors-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.colors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.color-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.15);
    border-color: #ffffff;
}

.color-btn.active {
    transform: scale(1.2);
    border-color: #ffffff;
    box-shadow: 0 0 20px currentColor;
}

.selected-character {
    text-align: center;
    margin-top: 2rem;
}

#player-character {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(125, 199, 255, 0.3);
}

.footer p {
    color: #cccccc;
    margin: 0.5rem 0;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: rgba(125, 199, 255, 0.2);
    color: #7DC7FF;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid #7DC7FF;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-link:hover {
    background: rgba(125, 199, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(125, 199, 255, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a0000 0%, #330000 100%);
    border: 5px solid #FF0000;
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 100px rgba(255, 0, 0, 0.8);
    animation: slideIn 0.4s ease-out;
}

.modal-header h2 {
    color: #FF0000;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.discussion-area {
    text-align: center;
    margin-bottom: 2rem;
}

.discussion-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
}

.player-votes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.vote-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-weight: 600;
}

.vote-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FF0000;
    transform: scale(1.05);
}

.close-modal {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.3);
    color: #ffffff;
    border: 2px solid #FF0000;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.close-modal:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: scale(1.02);
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        flex-direction: column;
    }

    .logo-icon {
        width: 60px;
        height: 72px;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .role-toggle {
        flex-direction: column;
        align-items: center;
    }

    .role-btn {
        width: 100%;
        max-width: 300px;
    }

    .roles-container {
        grid-template-columns: 1fr;
    }

    .meeting-content {
        grid-template-columns: 1fr;
    }

    .emergency-button {
        width: 200px;
        height: 200px;
        font-size: 1rem;
    }

    .emergency-icon {
        width: 60px;
        height: 60px;
    }

    .tasks-grid,
    .tips-grid,
    .maps-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}
