 body {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            min-height: 100vh;
            margin: 0;
            padding: 15px;
            background-color: #f4f4f9;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            box-sizing: border-box;
        }

        h1 {
            font-size: clamp(1.5rem, 5vw, 2.5rem);
            text-align: center;
            margin: 10px 0;
        }

        .nav {
            margin-bottom: 20px;
        }

        .nav a {
            font-size: 1.2rem;
            text-decoration: none;
            color: #0056b3;
            font-weight: bold;
        }

        .container {
            width: 100%;
            max-width: 500px;
            text-align: center;
        }

        .card-counter {
            font-size: 1.1rem;
            margin-bottom: 15px;
            color: #555;
        }

        /* --- Flashcard Styling --- */
        .card {
            width: 100%;
            height: clamp(250px, 50vh, 350px);
            perspective: 1000px;
            cursor: pointer;
            margin-bottom: 20px;
        }

        .card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.6s;
            transform-style: preserve-3d;
            box-shadow: 0 8px 16px rgba(0,0,0,0.15);
            border-radius: 20px;
        }

        .card.is-flipped .card-inner {
            transform: rotateY(180deg);
        }

        .card-face {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 20px;
            padding: 20px;
            box-sizing: border-box;
        }

        .card-face.front {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
        }

        .card-hebrew-text {
            direction: rtl; 
            font-size: clamp(2.5rem, 10vw, 4rem);
            font-weight: bold;
        }

        .card-face.back {
            background-color: #ffffff;
            color: #333;
            transform: rotateY(180deg);
            border: 4px solid #2575fc;
            font-size: clamp(2rem, 8vw, 3rem);
            font-weight: 600;
        }

        /* --- Button Controls --- */
        .controls-group {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
            margin-bottom: 20px;
            width: 100%;
        }

        .controls-group button, .btn-link {
            padding: 12px 20px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            border: none;
            border-radius: 12px;
            background-color: #007bff;
            color: white;
            flex: 1 1 140px; /* Allow buttons to grow/shrink but maintain a base width */
            max-width: 200px;
            transition: transform 0.1s, background-color 0.2s;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            text-decoration: none;
            display: inline-block;
          
        }

        .controls-group button:active {
            transform: scale(0.95);
        }

        #printButton { background-color: #28a745; }
        #random { background-color: #6f42c1; }
        #quiz-btn { background-color: #fd7e14; }

        .coffee-link {
        
            font-size: 1.2rem;
            color: #666;
            text-decoration: none;
            border: 2px solid #666;
            border-radius: 8px;
            padding: 8px 12px;
        }
        .coffee-link:hover {
            background-color: #f0f0f0;
        }   

        /* --- Print-Specific Styles --- */
        #printableList { display: none; }

        @media print {
            body * { visibility: hidden; }
            #printableList, #printableList * { visibility: visible; }
            #printableList {
                display: grid !important;
                grid-template-columns: 1fr 1fr;
                position: absolute;
                left: 0; top: 0; width: 100%;
            }
            .print-card {
                display: flex !important;
                justify-content: center;
                align-items: center;
                border: 1px solid #ccc;
                height: 3in;
                padding: 10px;
                text-align: center;
                page-break-inside: avoid;
            }
            .print-hebrew-content { font-size: 3rem; font-weight: bold; direction: rtl; }
            .print-english-content { font-size: 2rem; font-style: italic; }
        }