/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);

    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(102, 126, 234, 0.5);

    --x-color: #667eea;
    --o-color: #f5576c;

    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* ===== Background Effects ===== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.9);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

/* ===== Sound Control ===== */
/* ===== Top-Left Controls ===== */
.top-left-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-btn,
.sound-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover,
.sound-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    border-color: var(--x-color);
}

.sound-control-corner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-btn.playing {
    background: linear-gradient(135deg, var(--x-color), var(--o-color));
    border-color: transparent;
    animation: soundPulse 2s infinite;
}

.volume-popover {
    background: rgba(23, 25, 35, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sound-control-corner:hover .volume-popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.volume-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--x-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--x-color);
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

@keyframes soundPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 182, 172, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(77, 182, 172, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(77, 182, 172, 0);
    }
}

/* ===== Container ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

/* ===== Screens ===== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Start Screen ===== */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.game-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.title-letter {
    display: inline-block;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterPop 0.5s ease backwards;
}

.title-letter:nth-child(1) {
    animation-delay: 0.1s;
}

.title-letter:nth-child(2) {
    animation-delay: 0.15s;
}

.title-letter:nth-child(4) {
    animation-delay: 0.2s;
}

.title-letter:nth-child(5) {
    animation-delay: 0.25s;
}

.title-letter:nth-child(7) {
    animation-delay: 0.3s;
}

.title-letter:nth-child(8) {
    animation-delay: 0.35s;
}

.title-separator {
    width: 8px;
}

@keyframes letterPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.game-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== Settings Card ===== */
.settings-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Symbol Selector */
.symbol-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.symbol-btn {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-btn:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.symbol-btn.active {
    border-color: var(--x-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.symbol-btn[data-symbol="O"].active {
    border-color: var(--o-color);
    box-shadow: 0 0 20px rgba(245, 87, 108, 0.4);
}

.symbol-x {
    font-size: 2.5rem;
    color: var(--x-color);
    font-weight: 700;
}

.symbol-o {
    font-size: 3rem;
    color: transparent;
    -webkit-text-stroke: 3px var(--o-color);
    font-weight: 400;
    line-height: 1;
}

/* Name Input */
.name-input {
    width: 100%;
    padding: 15px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    transition: all var(--transition-medium);
    margin-bottom: 20px;
}

.name-input:focus {
    outline: none;
    border-color: var(--x-color);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
    background: var(--bg-card-hover);
}

.name-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.name-input.input-error {
    border-color: #ff4757;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.language-btn {
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 16px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-btn:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    color: var(--text-primary);
}

.language-btn.active {
    border-color: var(--x-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
}

.lang-flag {
    font-size: 1.4rem;
}

/* Difficulty & Rounds Selector */
.difficulty-selector,
.rounds-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.difficulty-btn,
.rounds-btn {
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.difficulty-btn:hover,
.rounds-btn:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.difficulty-btn.active,
.rounds-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== Buttons ===== */
.btn-primary {
    width: 100%;
    padding: 18px 30px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 16px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    width: 100%;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ===== Game Screen ===== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.score-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.score-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.score-icon span {
    color: var(--x-color);
}

.machine-score .score-icon span {
    color: var(--o-color);
}

.score-info {
    display: flex;
    flex-direction: column;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.round-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    padding: 8px 15px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    min-width: 100px;
}

.round-top {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.round-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.round-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.round-goal {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    opacity: 0.8;
}

/* Game Status */
.game-status {
    text-align: center;
    margin-bottom: 25px;
}

.status-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-height: 30px;
}

.status-text.player-turn {
    color: var(--x-color);
}

.status-text.machine-turn {
    color: var(--o-color);
}

/* Game Board */
.board-container {
    position: relative;
    margin-bottom: 30px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: var(--bg-card);
    padding: 15px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.cell:hover:not(.taken) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glow);
    transform: scale(1.02);
}

.cell.taken {
    cursor: not-allowed;
}

.cell.x {
    color: var(--x-color);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    animation: placeSymbol 0.3s ease;
}

.cell.o {
    color: transparent;
    -webkit-text-stroke: 3px var(--o-color);
    text-shadow: 0 0 20px rgba(245, 87, 108, 0.5);
    animation: placeSymbol 0.3s ease;
}


@keyframes placeSymbol {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cell.winner {
    animation: winPulse 0.6s ease infinite alternate;
}

@keyframes winPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

/* Winning Line */
.winning-line {
    position: absolute;
    background: var(--primary-gradient);
    border-radius: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.winning-line.show {
    opacity: 1;
}

/* ===== Lottery Screen ===== */
.lottery-content {
    text-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 50px 40px;
    box-shadow: var(--shadow-soft);
}

.lottery-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.lottery-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.lottery-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 3px solid var(--border-color);
    overflow: hidden;
}

.lottery-spinner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    animation: spinSymbols 0.4s linear infinite;
}

.lottery-spinner.stopped {
    animation: none;
}

.lottery-symbol {
    font-size: 4rem;
    font-weight: 700;
    padding: 0 20px;
}

.lottery-x {
    color: var(--x-color);
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
}

.lottery-o {
    color: transparent;
    -webkit-text-stroke: 3px var(--o-color);
    text-shadow: 0 0 30px rgba(245, 87, 108, 0.6);
}

@keyframes spinSymbols {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Animation for the winning symbol */
.lottery-symbol.winner {
    animation: celebrateWinner 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes celebrateWinner {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }

    50% {
        transform: scale(1.5);
        filter: brightness(1.5) drop-shadow(0 0 20px currentColor);
    }

    100% {
        transform: scale(1.3);
        opacity: 1;
        filter: brightness(1) drop-shadow(0 0 10px currentColor);
    }
}

.lottery-result {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.lottery-result.show {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lottery-result.show {
    opacity: 1;
    transform: translateY(0);
}

.lottery-result .result-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lottery-result .result-text.player-starts {
    color: var(--x-color);
}

.lottery-result .result-text.machine-starts {
    color: var(--o-color);
}



/* ===== Result Screen ===== */
.result-content {
    text-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 50px 40px;
    box-shadow: var(--shadow-soft);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.result-title.lose {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.final-scores {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.final-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.final-score-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-score-divider {
    font-size: 2rem;
    color: var(--text-muted);
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 500px) {
    .game-title {
        font-size: 3rem;
    }

    .game-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .score-panel {
        padding: 10px 14px;
    }

    .round-indicator {
        order: -1;
        width: 100%;
        flex-direction: row;
        gap: 8px;
    }

    .cell {
        font-size: 2.5rem;
    }

    .symbol-btn {
        width: 70px;
        height: 70px;
    }

    .difficulty-btn,
    .rounds-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Login Screen Components */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.full-width {
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 10px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #333;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.btn-social:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.btn-ghost:hover {
    opacity: 1;
}

/* Password Field with Toggle */
.password-field-container {
    position: relative;
    width: 100%;
}

.password-visibility-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.password-visibility-btn:hover {
    opacity: 1;
}

/* User Profile Dropdown Corner */
.user-profile-dropdown {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Outfit', sans-serif;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--x-color), var(--o-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.profile-status {
    color: #4cd137;
    font-size: 0.7rem;
    font-weight: 500;
}

.profile-trigger i {
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.user-profile-dropdown.active .profile-trigger i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: rgba(23, 25, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-dropdown.active .dropdown-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.dropdown-header {
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--x-color);
}

.dropdown-item .flag {
    font-size: 1.1rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.logout-danger {
    color: #ff4757 !important;
}

.logout-danger:hover {
    background: rgba(255, 71, 87, 0.1) !important;
}

/* Splash Screen */
.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 40px;
    text-align: center;
}

.btn-large {
    padding: 18px 60px;
    font-size: 1.4rem;
    letter-spacing: 2px;
    border-radius: 50px;
}

.pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Branding Footer */
.branding {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 1px;
    font-weight: 300;
}