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

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

        .header {
            background: rgba(255, 255, 255, 0.95);
            padding: 2rem;
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
            text-align: center;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        /* allow absolute positioned elements inside header */
        .header { position: relative; }

        .header h1 {
            color: #333;
            font-size: 1.8em;
            margin-bottom: 1rem;
        }


        /* navigation replaced by hamburger menu for mobile-first UX */
        .nav-buttons {
            display: none; /* hide simple buttons - we use hamburger menu */
        }

        .hamburger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            color: #fff;
            border-radius: 10px;
            cursor: pointer;
            border: none;
            font-size: 1.2rem;
            box-shadow: 0 6px 18px rgba(102,126,234,0.3);
        }

        /* position hamburger to the left inside header for RTL layout */
        .hamburger {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1100;
        }

        .hamburger:focus { outline: 3px solid rgba(102,126,234,0.25); }

        .hamburger-menu {
            position: absolute;
            top: 72px;
            left: 16px;
            right: auto;
            background: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            min-width: 220px;
            padding: 0.5rem 0;
            display: none;
            z-index: 110;
            direction: rtl;
            text-align: right;
        }

        .hamburger-menu a {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            padding: 0.8rem 1rem;
            color: #333;
            text-decoration: none;
            font-weight: bold;
        }

        .hamburger-menu a:hover {
            background: linear-gradient(90deg, rgba(102,126,234,0.06), rgba(118,75,162,0.06));
        }

        /* on larger screens show nav buttons inline */
        @media (min-width: 769px) {
            .nav-buttons { display: flex; gap: 1rem; justify-content: center; }
            .hamburger { display: none; }
            .hamburger-menu { display: none !important; }
        }

            /* Force hamburger visible and hide inline nav-buttons on all sizes
               so admin uses the single hamburger menu as requested. */
            .nav-buttons { display: none !important; }
            .hamburger { display: inline-flex !important; }
            .hamburger-menu { display: none; position: absolute; top: 64px; left: 16px; right: auto; z-index: 1200; direction: rtl; text-align: right; }
        .hamburger-menu.show { display: block !important; }

        .nav-btn {
            background: linear-gradient(45deg, #667eea, #764ba2);
            color: white;
            text-decoration: none;
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .nav-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .container {
            max-width: 1400px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        .section {
            background: rgba(255, 255, 255, 0.95);
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            margin-bottom: 2rem;
        }

        .section h2 {
            color: #333;
            margin-bottom: 1.5rem;
            font-size: 1.8em;
            text-align: center;
            border-bottom: 3px solid #667eea;
            padding-bottom: 0.5rem;
        }

        .topic-selector {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .topic-btn {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            color: #333;
        }

        .topic-btn:hover, .topic-btn.active {
            background: linear-gradient(45deg, #667eea, #764ba2);
            color: white;
            border-color: transparent;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .game-terms-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }

        .terms-list {
            background: #f8f9fa;
            padding: 1.5rem;
            border-radius: 10px;
            border: 2px solid #e9ecef;
        }

        .terms-list h3 {
            color: #333;
            margin-bottom: 1rem;
            text-align: center;
        }

        .term-item {
            background: white;
            padding: 1rem;
            margin-bottom: 0.8rem;
            border-radius: 8px;
            border: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s ease;
        }

        .term-item:hover {
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px);
        }

        .term-content {
            flex: 1;
        }

        .term-name {
            font-weight: bold;
            color: #333;
            margin-bottom: 0.3rem;
        }

        .term-definition {
            color: #666;
            font-size: 0.9em;
            line-height: 1.4;
        }

        .term-actions {
            display: flex;
            gap: 0.5rem;
        }

        .btn {
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            text-align: center;
        }

        .btn-primary {
            background: linear-gradient(45deg, #007bff, #0056b3);
            color: white;
        }

        .btn-success {
            background: linear-gradient(45deg, #28a745, #1e7e34);
            color: white;
        }

        .btn-warning {
            background: linear-gradient(45deg, #ffc107, #e0a800);
            color: #333;
        }

        .btn-danger {
            background: linear-gradient(45deg, #dc3545, #c82333);
            color: white;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .add-term-form {
            background: #e3f2fd;
            padding: 1.5rem;
            border-radius: 10px;
            border: 2px solid #2196f3;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: bold;
            color: #333;
        }

        .form-control {
            width: 100%;
            padding: 0.8rem;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        textarea.form-control {
            resize: vertical;
            min-height: 100px;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: white;
            padding: 1.5rem;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            border-left: 4px solid #667eea;
        }

        .stat-number {
            font-size: 1.5em;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 0.5rem;
        }

        .stat-label {
            color: #666;
            font-weight: bold;
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
        }

        .modal-content {
            background: white;
            margin: 5% auto;
            padding: 2rem;
            border-radius: 15px;
            width: 90%;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 1rem;
        }

        .modal-title {
            color: #333;
            font-size: 1.5em;
        }

        .close {
            font-size: 1.5em;
            cursor: pointer;
            color: #999;
            transition: color 0.3s ease;
        }

        .close:hover {
            color: #333;
        }

        .loading {
            text-align: center;
            padding: 2rem;
            color: #666;
        }

        .no-terms {
            text-align: center;
            padding: 2rem;
            color: #666;
            font-style: italic;
        }

        .search-box {
            width: 100%;
            padding: 0.8rem;
            margin-bottom: 1rem;
            border: 2px solid #e9ecef;
            border-radius: 25px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .search-box:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        @media (max-width: 768px) {
            .game-terms-container {
                grid-template-columns: 1fr;
            }

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

            .nav-buttons {
                gap: 0.5rem;
            }

            .topic-selector {
                flex-direction: column;
            }

            .term-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }

            .term-actions {
                align-self: stretch;
                justify-content: space-between;
            }

            .modal-content {
                margin: 10% auto;
                width: 95%;
            }
        }
