/*
================================================================
Rock Paper Scissors - Main Styles
================================================================
Project: Rock Paper Scissors
Description: Core styles for the game interface.

Created by: Amey Thakur (https://github.com/Amey-Thakur) & Mega Satish (https://github.com/msatmod)
Repository: https://github.com/Amey-Thakur/ROCK-PAPER-SCISSORS
License: MIT
Date Released: 2022-03-12
================================================================
*/

@import url('theme.css');

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

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    /* Prevent scrolling as requested */
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    padding: 20px;
}

/* Button Home (Play Again) */
.btn-home {
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    border: none;
    font-family: var(--font-main);
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-home:hover {
    transform: translateY(-3px);
    background: var(--accent-hover);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Background Animations */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.03);
    font-size: 8rem;
    animation: floatBackground 20s infinite ease-in-out alternate;
}

@keyframes floatBackground {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* Main Container */
.game-container {
    max-width: var(--container-width);
    width: 100%;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    /* Safe padding */
    box-shadow: 0 40px 80px -12px rgba(0, 0, 0, 0.5);
}

/* Header & Scoreboard */
.header {
    margin-bottom: 20px;
    text-align: center;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(120deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.score-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 25px;
    border-radius: var(--border-radius-pill);
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
    min-width: 140px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-hover);
    margin-left: 8px;
}

/* Game Area */
.arena {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    min-height: 150px;
    /* Balanced arena */
    margin: 10px 0;
}

.hand-display {
    text-align: center;
    width: 140px;
}

.hand-icon {
    font-size: 4.5rem;
    /* Larger visuals */
    margin-bottom: 5px;
    display: block;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ... existing animation code ... */

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ... existing btn-choice styles ... */

/* Status Message */
.status-msg {
    font-size: 1.4rem;
    min-height: 2rem;
    margin: 10px 0;
    font-weight: 600;
}

/* Footer */
.main-footer {
    margin-top: auto;
    /* Push to bottom if flex container has space */
    padding-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--glass-border);
}

.player-label {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animations */
.shake {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(15deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.pop {
    animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

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

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.btn-choice {
    background: var(--glass-bg);
    border: 2px solid var(--accent-color);
    color: var(--text-primary);
    font-size: 1.8rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Rotate scissors to point upwards (Right Hand) - Final Fix */
.btn-choice .fa-hand-scissors {
    transform: scaleX(1) rotate(90deg);
    /* Remove flip if it causes issues, or adjust. Wait, user wanted Right Hand. Other icons are right hand. */
    /* Let's try JUST rotate(90deg) if the Flip was causing confusion? No, user explicitly said "Left Hand" issue. */
    /* If 270 was Down, 90 is Up. Let's stick to 90. */
    transform: scaleX(-1) rotate(90deg);
}

/* ... hover/active ... */

/* Status Message */
.status-msg {
    font-size: 1.3rem;
    min-height: 2rem;
    margin: 10px 0;
    font-weight: 600;
}

/* Footer */
.main-footer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

.btn-choice:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-choice:active {
    transform: translateY(-2px);
}

/* Stats Bar & Hearts */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 10px auto;
    width: 100%;
    padding: 0 10px;
}

@media (max-width: 400px) {
    .stats-bar {
        font-size: 0.9rem;
    }
}

.lives-container {
    display: flex;
    gap: 5px;
}

.heart {
    color: #f87171;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.heart.lost {
    color: #334155;
    transform: scale(0.8);
    opacity: 0.5;
}

.high-score {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-gradient-start);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #f87171;
}

.final-score {
    font-size: 1.5rem;
    margin: 20px 0 30px 0;
    color: var(--text-primary);
}

/* Status Message */
.status-msg {
    font-size: 1.6rem;
    min-height: 2.5rem;
    /* Reserve space */
    margin: 10px 0;
    font-weight: 600;
}

/* Footer */
.main-footer {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.main-footer a {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.main-footer a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Tablet / Laptop (Small) Responsiveness */
@media (max-width: 900px) {
    .game-container {
        padding: 30px;
        max-width: 90%;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .hand-icon {
        font-size: 4rem;
    }

    .arena {
        gap: 30px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
    }

    .main-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .score-board {
        gap: 15px;
    }

    .score-badge {
        min-width: 100px;
        font-size: 1rem;
        padding: 8px 15px;
    }

    .arena {
        gap: 15px;
        min-height: 120px;
    }

    .hand-icon {
        font-size: 3.5rem;
    }

    .btn-choice {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Particle Effects */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    animation: particles 1s forwards;
    z-index: 10;
}

@keyframes particles {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Loading Screen (Apple Style) - Optimized */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    /* Deep Blue Gradient */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

#loading-logo {
    width: 200px;
    filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.4));
    opacity: 1;
    margin-bottom: 40px;
    animation: pulseLogo 2s infinite ease-in-out;
}

#loading-bar-container {
    width: 280px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

#loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    /* Accent Gradient */
    border-radius: 3px;
    transition: width 0.3s ease;
}

#loading-message {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 30px;
    font-weight: 700;
    font-family: 'Play', sans-serif;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.4));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(96, 165, 250, 0.6));
    }
} 
