 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #640a7a 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }

        .header {
            text-align: center;
            color: white;
            margin-bottom: 20px;
        }

        .controls {
            display: flex;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .btn-primary {
            background: linear-gradient(45deg, #ff6b6b, #ff8e53);
            color: white;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
        }

        .btn-secondary {
            background: linear-gradient(45deg, #4ecdc4, #44a08d);
            color: white;
            box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
        }

        .card-container {
            perspective: 1000px;
            margin-bottom: 30px;
        }

        .flashcard {
            width: 720px;
            height: 640px;
            position: relative;
            transform-style: preserve-3d;
            transition: transform 0.8s ease;
            cursor: pointer;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .flashcard.flipped {
            transform: rotateY(180deg);
        }

        .card-face {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: white;
            overflow: hidden;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        }

        .card-back {
            transform: rotateY(180deg);
        }

        .card-face img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 15px;
        }

        .card-face.loading {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: #666;
            background: #f8f9fa;
        }

        .card-face.error {
            background: #ffe6e6;
            color: #d63384;
            flex-direction: column;
            gap: 10px;
            font-size: 16px;
            text-align: center;
        }

        .navigation {
            display: flex;
            gap: 20px;
            align-items: center;
            color: white;
            font-size: 18px;
            margin-top: 20px;
            justify-content: center;
        }

        .nav-btn {
            padding: 10px 20px;
            border: 2px solid white;
            background: transparent;
            color: white;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 16px;
        }

        .nav-btn:hover {
            background: white;
            color: #667eea;
        }

        .nav-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .nav-btn:disabled:hover {
            background: transparent;
            color: white;
        }

        .card-counter {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 16px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
        }

        .progress-bar {
            width: 720px;
            height: 8px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            overflow: hidden;
            margin-top: 20px;
        }

        .progress {
            height: 100%;
            background: linear-gradient(45deg, #ff6b6b, #ff8e53);
            border-radius: 4px;
            transition: width 0.3s ease;
        }

        .status-success {
            background: rgba(25, 135, 84, 0.9);
            color: white;
        }

        @media (max-width: 600px) {
            .flashcard {
                width: 90vw;
                height: 300px;
            }

            .controls {
                flex-direction: column;
                align-items: center;
            }

            .progress-bar {
                width: 90vw;
            }
        }