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

        :root {
            --primary-dark: #0a0e27;
            --secondary-dark: #1a1f3a;
            --accent-gold: #d4af37;
            --accent-light: #e8d5c4;
            --text-primary: #ffffff;
            --text-secondary: #b0b0b0;
            --black-disc: #1a1a1a;
            --white-disc: #f5f5f5;
            --board-green: #0d5f3f;
            --board-highlight: #1a9b6f;
            --success: #4ade80;
            --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background:
                radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.02) 0%, transparent 50%);
            pointer-events: none;
            z-index: 0;
        }

        .preloader {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            gap: 30px;
            animation: fadeOut 0.6s ease-out 2.4s forwards;
        }

        .preloader-content {
            text-align: center;
        }

        .preloader h1 {
            font-family: 'Playfair Display', serif;
            font-size: clamp(2rem, 8vw, 4rem);
            font-weight: 900;
            background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-light) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
            letter-spacing: 2px;
        }

        .preloader p {
            color: var(--text-secondary);
            font-size: 0.95rem;
            font-weight: 300;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .spinner {
            width: 60px;
            height: 60px;
            border: 3px solid rgba(212, 175, 55, 0.2);
            border-top-color: var(--accent-gold);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        @keyframes fadeOut {
            to {
                opacity: 0;
                visibility: hidden;
            }
        }

        .container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 1200px;
            padding: 20px;
            animation: slideIn 0.8s ease-out 2.4s backwards;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
        }

        .header h1 {
            font-family: 'Playfair Display', serif;
            font-size: clamp(2rem, 8vw, 3.5rem);
            font-weight: 900;
            background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-light) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 5px;
            letter-spacing: 2px;
        }

        .header p {
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 300;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        .game-wrapper {
            display: flex;
            gap: 40px;
            align-items: flex-start;
            flex-wrap: wrap;
            justify-content: center;
        }

        .board-container {
            position: relative;
            flex: 1;
            min-width: 320px;
            max-width: 500px;
        }

        .game-status {
            background: rgba(26, 31, 58, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
        }

        .current-turn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 15px;
        }

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

        .turn-indicator {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--black-disc);
            box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
            animation: pulse 2s ease-in-out infinite;
        }

        .turn-indicator.white {
            background: var(--white-disc);
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.2);
            }
        }

        .game-mode-selector {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            justify-content: center;
        }

        .mode-btn {
            padding: 8px 16px;
            border: 1px solid rgba(212, 175, 55, 0.5);
            background: rgba(212, 175, 55, 0.1);
            color: var(--text-primary);
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            transition: var(--transition-smooth);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .mode-btn:hover {
            background: rgba(212, 175, 55, 0.2);
            border-color: var(--accent-gold);
        }

        .mode-btn.active {
            background: var(--accent-gold);
            color: var(--primary-dark);
            border-color: var(--accent-gold);
        }

        .board {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 0;
            background: var(--board-green);
            border: 3px solid var(--accent-gold);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(212, 175, 55, 0.2);
            margin-bottom: 20px;
        }

        .cell {
            aspect-ratio: 1;
            background: var(--board-green);
            border: 1px solid rgba(26, 155, 111, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: background-color 0.2s ease;
            user-select: none;
        }

        .cell:hover {
            background: var(--board-highlight);
        }

        .cell.valid-move::after {
            content: '';
            width: 30%;
            height: 30%;
            background: var(--accent-gold);
            border-radius: 50%;
            opacity: 0.4;
            animation: validMoveGlow 1.5s ease-in-out infinite;
        }

        @keyframes validMoveGlow {

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

            50% {
                transform: scale(1.5);
                opacity: 0.1;
            }
        }

        .disc {
            width: 85%;
            height: 85%;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset -2px -2px 8px rgba(0, 0, 0, 0.3);
            animation: discPlace 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes discPlace {
            from {
                transform: scale(0);
            }

            to {
                transform: scale(1);
            }
        }

        .disc.black {
            background: radial-gradient(circle at 30% 30%, rgba(80, 80, 80, 0.8) 0%, var(--black-disc) 50%);
        }

        .disc.white {
            background: radial-gradient(circle at 30% 30%, #ffffff 0%, var(--white-disc) 50%);
        }

        .disc.flipping {
            animation: discFlip 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        @keyframes discFlip {
            0% {
                transform: scaleY(1);
            }

            50% {
                transform: scaleY(0);
            }

            100% {
                transform: scaleY(1);
            }
        }

        .cell.last-move .disc {
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
                0 5px 15px rgba(0, 0, 0, 0.4),
                inset -2px -2px 8px rgba(0, 0, 0, 0.3);
        }

        .control-panel {
            display: flex;
            flex-direction: column;
            gap: 20px;
            flex: 1;
            min-width: 210px;
            max-width: 210px;
        }

        .panel-section {
            background: rgba(26, 31, 58, 0.8);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 20px;
            padding: 20px;
        }

        .section-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--accent-gold);
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 1px;
            border-bottom: 1px solid rgba(212, 175, 55, 0.2);
            padding-bottom: 10px;
        }

        .score-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding: 10px;
            background: rgba(212, 175, 55, 0.05);
            border-radius: 10px;
            transition: var(--transition-smooth);
        }

        .score-item:last-child {
            margin-bottom: 0;
        }

        .score-label {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .score-disc {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .score-disc.black {
            background: var(--black-disc);
        }

        .score-disc.white {
            background: var(--white-disc);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .score-number {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--accent-gold);
            min-width: 40px;
            text-align: right;
        }

        .button-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        button {
            padding: 12px 20px;
            border: 1px solid rgba(212, 175, 55, 0.5);
            border-radius: 10px;
            font-family: 'Poppins', sans-serif;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: var(--transition-smooth);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
        }

        button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        button:active::before {
            width: 300px;
            height: 300px;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--accent-gold) 0%, #f0c77a 100%);
            color: var(--primary-dark);
            border-color: var(--accent-gold);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
        }

        .btn-secondary {
            background: rgba(212, 175, 55, 0.1);
            color: var(--text-primary);
            border-color: rgba(212, 175, 55, 0.5);
        }

        .btn-secondary:hover {
            background: rgba(212, 175, 55, 0.15);
            border-color: var(--accent-gold);
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .toggle-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px;
            background: rgba(212, 175, 55, 0.05);
            border-radius: 10px;
        }

        .toggle-label {
            font-size: 0.9rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toggle-switch {
            width: 50px;
            height: 26px;
            background: rgba(212, 175, 55, 0.3);
            border: 1px solid rgba(212, 175, 55, 0.5);
            border-radius: 13px;
            position: relative;
            cursor: pointer;
            transition: var(--transition-smooth);
        }

        .toggle-switch.active {
            background: var(--success);
            border-color: var(--success);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 22px;
            height: 22px;
            background: white;
            border-radius: 50%;
            transition: var(--transition-smooth);
        }

        .toggle-switch.active::after {
            left: 26px;
        }

        .game-info {
            font-size: 0.8rem;
            color: var(--text-secondary);
            padding: 10px;
            background: rgba(212, 175, 55, 0.05);
            border-radius: 8px;
            line-height: 1.6;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease-out;
        }

        .modal.show {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .modal-content {
            background: rgba(26, 31, 58, 0.95);
            backdrop-filter: blur(10px);
            border: 2px solid var(--accent-gold);
            border-radius: 30px;
            padding: 50px 40px;
            text-align: center;
            max-width: 500px;
            animation: modalSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
        }

        .modal-content.how-to-play-content {
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
            text-align: left;
            padding: 40px;
        }

        .how-to-section {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        }

        .how-to-section:last-of-type {
            border-bottom: none;
        }

        .how-to-section h3 {
            color: var(--accent-gold);
            font-size: 1.1rem;
            margin-bottom: 10px;
            font-family: 'Playfair Display', serif;
        }

        .how-to-section p {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 5px;
        }

        .how-to-section ul {
            list-style: none;
            padding-left: 0;
        }

        .how-to-section li {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.7;
            padding: 5px 0;
            padding-left: 20px;
            position: relative;
        }

        .how-to-section li::before {
            content: '▸';
            position: absolute;
            left: 0;
            color: var(--accent-gold);
        }

        .how-to-section strong {
            color: var(--accent-light);
        }

        @keyframes modalSlide {
            from {
                opacity: 0;
                transform: scale(0.8) translateY(-50px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .modal-emoji {
            font-size: 4rem;
            margin-bottom: 20px;
            animation: bounce 0.6s ease-out;
        }

        @keyframes bounce {
            0% {
                transform: translateY(-30px);
                opacity: 0;
            }

            50% {
                transform: translateY(10px);
            }

            100% {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-title {
            font-family: 'Playfair Display', serif;
            font-size: 2.5rem;
            font-weight: 900;
            color: var(--accent-gold);
            margin-bottom: 15px;
            letter-spacing: 2px;
        }

        .modal-text {
            font-size: 1.1rem;
            color: var(--text-secondary);
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .modal-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .move-history {
            max-height: 300px;
            overflow-y: auto;
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            font-size: 0.8rem;
        }

        .move-item {
            padding: 8px;
            margin-bottom: 5px;
            background: rgba(212, 175, 55, 0.05);
            border-left: 3px solid var(--accent-gold);
            border-radius: 5px;
        }

        @media (max-width: 1024px) {
            .game-wrapper {
                flex-direction: column;
                gap: 20px;
            }

            .control-panel {
                width: 100%;
                max-width: 100%;
            }

            .board-container {
                max-width: 100%;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }

            .header {
                margin-bottom: 20px;
            }

            .header h1 {
                font-size: 1.8rem;
            }

            .header p {
                font-size: 0.8rem;
            }

            .game-wrapper {
                flex-direction: column;
                gap: 15px;
            }

            .control-panel {
                width: 100%;
                flex-direction: row;
                flex-wrap: wrap;
                gap: 15px;
            }

            .panel-section {
                flex: 1;
                min-width: 150px;
                padding: 15px;
            }

            .board-container {
                max-width: 100%;
                width: 100%;
            }

            .board {
                margin-bottom: 15px;
            }

            .button-group {
                flex-direction: row;
                gap: 10px;
            }

            .button-group button {
                flex: 1;
                padding: 10px;
                font-size: 0.8rem;
            }

            .game-status {
                padding: 15px;
                margin-bottom: 15px;
            }

            .game-mode-selector {
                flex-direction: column;
                gap: 8px;
            }

            .mode-btn {
                width: 100%;
                padding: 10px;
            }

            .modal-content {
                padding: 30px 20px;
                margin: 20px;
                border-radius: 20px;
            }

            .modal-content.how-to-play-content {
                padding: 25px;
            }

            .modal-title {
                font-size: 1.6rem;
            }

            .modal-text {
                font-size: 0.95rem;
            }

            .how-to-section h3 {
                font-size: 1rem;
            }

            .how-to-section p {
                font-size: 0.85rem;
            }

            .how-to-section li {
                font-size: 0.85rem;
            }

            .score-number {
                font-size: 1.2rem;
            }

            .move-history {
                max-height: 200px;
                font-size: 0.7rem;
            }
        }

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

            .header h1 {
                font-size: 1.5rem;
            }

            .header p {
                font-size: 0.7rem;
            }

            .control-panel {
                gap: 10px;
            }

            .panel-section {
                flex: 1;
                min-width: 120px;
                padding: 12px;
            }

            .section-title {
                font-size: 0.8rem;
                margin-bottom: 8px;
            }

            .game-status {
                padding: 12px;
                border-radius: 15px;
            }

            .mode-btn {
                padding: 8px 12px;
                font-size: 0.7rem;
            }

            .current-turn {
                flex-direction: column;
                gap: 8px;
            }

            .turn-label {
                font-size: 0.7rem;
            }

            .turn-indicator {
                width: 20px;
                height: 20px;
            }

            .cell {
                border-width: 0.5px;
            }

            .disc {
                width: 90%;
                height: 90%;
            }

            .button-group {
                gap: 8px;
            }

            .button-group button {
                padding: 10px;
                font-size: 0.75rem;
            }

            .score-disc {
                width: 16px;
                height: 16px;
            }

            .score-number {
                font-size: 1rem;
            }

            .toggle-container {
                padding: 8px;
                flex-direction: column;
                gap: 8px;
            }

            .game-info {
                font-size: 0.7rem;
                padding: 8px;
            }

            .move-history {
                max-height: 150px;
                font-size: 0.65rem;
            }

            .modal-content {
                padding: 20px 15px;
                margin: 15px;
            }

            .modal-content.how-to-play-content {
                padding: 20px;
            }

            .modal-emoji {
                font-size: 3rem;
            }

            .modal-title {
                font-size: 1.3rem;
            }

            .modal-text {
                font-size: 0.85rem;
            }

            .how-to-section h3 {
                font-size: 0.95rem;
                margin-bottom: 8px;
            }

            .how-to-section p {
                font-size: 0.8rem;
            }

            .how-to-section li {
                font-size: 0.8rem;
                padding: 4px 0;
            }

            .modal-buttons {
                flex-direction: column;
            }

            button {
                padding: 10px 15px;
                font-size: 0.75rem;
            }
        }

        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(212, 175, 55, 0.05);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(212, 175, 55, 0.3);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(212, 175, 55, 0.5);
        }