/* Four Wins - Modern & Playful Styles */

:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6B9D;
    --accent-color: #4ECDC4;
    --success-color: #1DD1A1;
    --warning-color: #FFC107;
    --danger-color: #FF6B6B;
    --dark-bg: #2C3E50;
    --light-bg: #ECF0F1;
    --player1-color: #FF6B6B;
    --player2-color: #4ECDC4;
    --board-color: #2C3E50;
}

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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2C3E50;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.title {
    font-size: 3.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Menu Container */
.menu-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.menu-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mode-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mode-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mode-button.solo {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.mode-button.two-player {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.button-icon {
    font-size: 3rem;
}

.button-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.button-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Stats Preview */
.stats-preview {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.stats-preview h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-bg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Achievements Preview */
.achievements-preview {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    border-radius: 15px;
    padding: 25px;
    color: white;
}

.achievements-preview h3 {
    text-align: center;
    margin-bottom: 20px;
}

.achievement-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.achievement-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement-icon.locked {
    filter: grayscale(100%);
    opacity: 0.3;
}

.achievement-icon.unlocked {
    animation: bounce 0.6s ease;
}

.achievement-icon:hover {
    transform: scale(1.1);
}

/* Game Info */
.game-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.5s ease-out;
}

.player-indicator {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.player-indicator.player-1 {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #c0392b;
}

.player-indicator.player-2 {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    color: #2980b9;
}

.victory-text {
    animation: pulse 1s infinite;
    font-size: 1.8rem;
}

.draw-text {
    color: #7f8c8d;
}

.ai-message {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
    animation: slideInLeft 0.5s ease-out;
}

.fun-message {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: var(--dark-bg);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    animation: slideInRight 0.5s ease-out;
}

/* Game Board */
.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
}

.game-board {
    background: var(--board-color);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(7, 70px);
    grid-template-rows: auto;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.column {
    display: grid;
    grid-template-rows: repeat(6, 60px);
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.column.valid {
    cursor: pointer;
}

.column.valid:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cell.last-move::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #ffd700;
    border-radius: 50%;
    animation: glow 1.5s infinite;
}

.disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.3);
}

.disc.empty {
    background: rgba(255, 255, 255, 0.1);
}

.disc.player1 {
    background: radial-gradient(circle at 30% 30%, #ff9999, var(--player1-color));
    animation: dropIn 0.5s ease-out;
}

.disc.player2 {
    background: radial-gradient(circle at 30% 30%, #7ee8e0, var(--player2-color));
    animation: dropIn 0.5s ease-out;
}

.disc.winning {
    animation: winning 1s infinite;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 0.7s ease-out;
}

.control-button {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-button.new-game {
    background: linear-gradient(135deg, var(--success-color), #10ac84);
    color: white;
}

.control-button.back-menu {
    background: linear-gradient(135deg, #95afc0, #576574);
    color: white;
}

.control-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-width: 500px;
    animation: bounceIn 0.6s ease-out;
    text-align: center;
}

.achievement-notification h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.achievement-unlocked {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.achievement-icon-large {
    font-size: 3rem;
}

.achievement-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark-bg);
}

.achievement-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.achievement-notification button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.achievement-notification button:hover {
    transform: scale(1.05);
}

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

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes dropIn {
    from {
        transform: translateY(-300px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes winning {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 40px rgba(255, 215, 0, 1);
    }
}

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

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

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

@keyframes bounceIn {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

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

    .subtitle {
        font-size: 1rem;
    }

    .menu-container {
        padding: 20px;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-board {
        padding: 10px;
        gap: 5px;
    }

    .column {
        gap: 5px;
        padding: 5px;
    }

    .control-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .achievement-notification {
        max-width: 90%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .game-board {
        transform: scale(0.9);
    }

    .game-controls {
        flex-direction: column;
    }
}

/* Blazor Error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
