/* ============================================
   ورق قتالي - قِيَاس دويل (Kimi-Yugi Game)
   Complete CSS Styling System
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary-color: #00cec9;
    --accent-color: #fd79a8;
    --danger-color: #e74c3c;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-panel: #1a1a25;
    --bg-elevated: #22222f;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --monster-color: #e74c3c;
    --guardian-color: #3498db;
    --trap-color: #9b59b6;
    --spell-color: #f1c40f;
    --legend-color: #e67e22;
    
    --font-arabic: 'Cairo', 'Tajawal', sans-serif;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #151520 50%, var(--bg-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.logo-container {
    margin-bottom: 3rem;
}

.logo-symbol {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(108, 92, 231, 0.5));
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.game-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(108, 92, 231, 0.3);
    letter-spacing: -1px;
}

.game-subtitle {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: 0.5rem;
    text-shadow: 0 0 30px rgba(253, 121, 168, 0.4);
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 2rem auto;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
}

.loading-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ============================================
   MAIN MENU
   ============================================ */
.main-menu {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.menu-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-cards {
    position: absolute;
    width: 100%;
    height: 100%;
}

.float-card {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: floatCard 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

.float-card:nth-child(1) { top: 10%; left: 10%; }
.float-card:nth-child(2) { top: 20%; right: 15%; }
.float-card:nth-child(3) { bottom: 20%; left: 20%; }
.float-card:nth-child(4) { bottom: 10%; right: 10%; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.menu-content {
    text-align: center;
    z-index: 1;
    max-width: 500px;
    width: 100%;
}

.logo-main {
    margin-bottom: 4rem;
}

.main-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 5s ease infinite;
    text-shadow: 0 0 80px rgba(108, 92, 231, 0.4);
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.main-subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-arabic);
    color: var(--text-primary);
    background: var(--bg-panel);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

.menu-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.menu-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.5);
}

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

.btn-text {
    letter-spacing: 1px;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.modal-content input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: var(--font-arabic);
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.modal-content input::placeholder {
    color: var(--text-muted);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-arabic);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ============================================
   GAME INTERFACE
   ============================================ */
.game-interface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
}

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

.opponent-info {
    justify-content: flex-start;
}

.self-info {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.player-avatar {
    position: relative;
}

.avatar-frame {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.avatar-frame.self {
    background: linear-gradient(135deg, var(--secondary-color), var(--success-color));
    box-shadow: 0 0 20px rgba(0, 206, 201, 0.3);
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
}

/* LP Bar */
.lp-bar {
    position: relative;
    width: 150px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.lp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #00d2a0);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.lp-fill.opponent-lp {
    background: linear-gradient(90deg, var(--danger-color), #ff6b6b);
}

.lp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.lp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 900;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Game Center */
.game-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.turn-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.turn-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.turn-timer {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
}

.phase-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

/* ============================================
   QUESTION AREA
   ============================================ */
.question-area {
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.question-container {
    width: 100%;
    max-width: 800px;
    animation: slideIn 0.3s ease;
}

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

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

.question-type {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.question-difficulty {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

.question-difficulty[data-difficulty="سهل"] {
    background: rgba(0, 184, 148, 0.2);
    color: var(--success-color);
}

.question-difficulty[data-difficulty="متوسط"] {
    background: rgba(253, 203, 110, 0.2);
    color: var(--warning-color);
}

.question-difficulty[data-difficulty="صعب"] {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.question-difficulty[data-difficulty="أسطوري"] {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2), rgba(253, 121, 168, 0.2));
    color: var(--legend-color);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(230, 126, 34, 0.5); }
    50% { box-shadow: 0 0 20px rgba(230, 126, 34, 0.8); }
}

/* Question Timer */
.question-timer {
    position: relative;
    width: 60px;
    height: 60px;
}

.timer-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.timer-progress {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text-primary);
}

/* Question Content */
.question-content {
    text-align: center;
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Options */
.options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.option-btn {
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-arabic);
    background: var(--bg-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-align: right;
}

.option-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.option-btn.correct {
    background: rgba(0, 184, 148, 0.2);
    border-color: var(--success-color);
    animation: correctPulse 0.5s ease;
}

.option-btn.wrong {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--danger-color);
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Waiting Message */
.waiting-message {
    text-align: center;
}

.waiting-animation {
    margin-bottom: 1rem;
}

.card-shuffle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 3rem;
}

.card-shuffle span {
    animation: shuffle 1s ease-in-out infinite;
}

.card-shuffle span:nth-child(2) { animation-delay: 0.1s; }
.card-shuffle span:nth-child(3) { animation-delay: 0.2s; }

@keyframes shuffle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

.waiting-message p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ============================================
   GAME FIELD
   ============================================ */
.game-field {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.1) 0%, transparent 50%, rgba(0, 206, 201, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    min-height: 200px;
}

.field-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card-slot {
    width: 100px;
    height: 140px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

.card-slot.occupied {
    border-style: solid;
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
}

.card-back {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.card-back::before {
    content: '⚔️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.5;
}

.card-back::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.effects-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.battle-effect {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    animation: battleEffect 1s ease forwards;
}

@keyframes battleEffect {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* ============================================
   HAND CONTAINER
   ============================================ */
.hand-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.hand-cards {
    display: flex;
    gap: -30px;
    flex: 1;
    justify-content: center;
    perspective: 1000px;
}

/* Game Card */
.game-card {
    width: 100px;
    height: 140px;
    background: var(--bg-card);
    border: 2px solid;
    border-radius: 10px;
    padding: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    transform-style: preserve-3d;
    margin-left: -30px;
}

.game-card:first-child {
    margin-left: 0;
}

.game-card:hover {
    transform: translateY(-30px) rotateY(5deg) scale(1.1);
    z-index: 10;
}

.game-card.MONSTER { border-color: var(--monster-color); }
.game-card.GUARDIAN { border-color: var(--guardian-color); }
.game-card.TRAP { border-color: var(--trap-color); }
.game-card.SPELL { border-color: var(--spell-color); }
.game-card.LEGEND { 
    border-color: var(--legend-color);
    animation: legendGlow 2s ease-in-out infinite;
}

@keyframes legendGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(230, 126, 34, 0.5); }
    50% { box-shadow: 0 0 30px rgba(230, 126, 34, 0.8); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-type-icon {
    font-size: 1.2rem;
}

.card-difficulty {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.card-content {
    text-align: center;
    margin-bottom: 0.5rem;
}

.card-category {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-atk {
    color: var(--monster-color);
}

.card-def {
    color: var(--guardian-color);
}

/* Deck Info */
.deck-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.deck-pile {
    position: relative;
    width: 70px;
    height: 100px;
    background: linear-gradient(135deg, #2d2d3a, #1a1a25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.deck-pile::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 5px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3d3d4a, #2a2a35);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    z-index: -1;
}

.deck-pile::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4d4d5a, #3a3a45);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    z-index: -2;
}

.deck-count {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
}

.deck-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    z-index: 10000;
    animation: notificationIn 0.3s ease, notificationOut 0.3s ease 2.7s forwards;
}

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

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

.notification.success {
    background: rgba(0, 184, 148, 0.9);
    color: white;
}

.notification.error {
    background: rgba(231, 76, 60, 0.9);
    color: white;
}

.notification.info {
    background: rgba(108, 92, 231, 0.9);
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .game-title, .main-title {
        font-size: 2.5rem;
    }
    
    .game-subtitle, .main-subtitle {
        font-size: 1.5rem;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .lp-bar {
        width: 120px;
    }
    
    .hand-cards {
        gap: -20px;
    }
    
    .game-card {
        width: 85px;
        height: 120px;
        margin-left: -20px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .player-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .game-center {
        order: -1;
    }
    
    .question-area {
        padding: 1rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .option-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .field-row {
        gap: 1rem;
    }
    
    .card-slot {
        width: 80px;
        height: 110px;
    }
    
    .hand-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .hand-cards {
        flex-wrap: wrap;
    }
    
    .game-card {
        width: 75px;
        height: 105px;
        margin-left: -15px;
    }
    
    .menu-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-title, .main-title {
        font-size: 2rem;
    }
    
    .logo-symbol {
        font-size: 3.5rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.4rem;
    }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */
.damage-effect {
    animation: damageShake 0.5s ease;
}

@keyframes damageShake {
    0%, 100% { transform: translateX(0); filter: hue-rotate(0deg); }
    20% { transform: translateX(-10px); filter: hue-rotate(90deg) saturate(2); }
    40% { transform: translateX(10px); filter: hue-rotate(180deg) saturate(2); }
    60% { transform: translateX(-10px); filter: hue-rotate(270deg) saturate(2); }
    80% { transform: translateX(10px); filter: hue-rotate(360deg) saturate(2); }
}

.heal-effect {
    animation: healPulse 0.5s ease;
}

@keyframes healPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.5) saturate(1.5); }
}

.card-played {
    animation: cardPlayed 0.5s ease forwards;
}

@keyframes cardPlayed {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Selection Color */
::selection {
    background: rgba(108, 92, 231, 0.3);
    color: var(--text-primary);
}
