 :root {
            --primary: #6366f1;
            --accent: #a855f7;
            --glass: rgba(255, 255, 255, 0.95);
        }

        body {
            margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
            font-family: 'Inter', -apple-system, sans-serif;
            background: radial-gradient(at 0% 0%, #c7d2fe 0, transparent 50%), 
                        radial-gradient(at 100% 100%, #fbcfe8 0, transparent 50%), #f3f4f6;
            padding: 15px;
        }

        .card {
            background: var(--glass);
            width: 100%; max-width: 400px;
            padding: 25px; border-radius: 24px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.7);
            text-align: center;
        }

        .logo { width: 60px; height: 60px; border-radius: 15px; margin-bottom: 15px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        h1 { font-size: 22px; color: #111827; margin: 0; font-weight: 800; }
        p.sub { font-size: 14px; color: #6b7280; margin: 5px 0 25px; }

        .input-group { margin-bottom: 15px; text-align: left; }
        label { display: block; font-size: 11px; font-weight: 700; color: #4b5563; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
        
        input {
            width: 100%; padding: 12px 14px; box-sizing: border-box;
            border: 1.5px solid #e5e7eb; border-radius: 12px;
            font-size: 14px; transition: all 0.3s; background: #fff;
        }

        input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }

        .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

        .btn-reg {
            width: 100%; padding: 14px; border: none; border-radius: 12px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white; font-size: 16px; font-weight: 700; cursor: pointer;
            margin-top: 15px; transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }
        .btn-reg:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); }
        .btn-reg:active { transform: scale(0.98); }

        .error { font-size: 13px; color: #b91c1c; background: #fee2e2; padding: 12px; border-radius: 10px; margin-bottom: 20px; border: 1px solid #fecaca; display: flex; align-items: center; gap: 8px; }
        
        .footer { margin-top: 25px; font-size: 14px; color: #4b5563; }
        .footer a { color: var(--primary); text-decoration: none; font-weight: 700; }

        #loader { display: none; margin: 15px auto 0; }
        .spinner { border: 3px solid rgba(0,0,0,0.1); border-top: 3px solid var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 0.8s linear infinite; }
        @keyframes spin { 100% { transform: rotate(360deg); } }

        /* Terms Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: white;
            margin: 5% auto;
            padding: 0;
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            max-height: 85vh;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s ease;
            overflow: hidden;
        }

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

        .modal-header {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            padding: 20px 25px;
            text-align: center;
        }

        .modal-header h2 {
            margin: 0;
            font-size: 20px;
            font-weight: 800;
        }

        .modal-header p {
            margin: 5px 0 0;
            font-size: 13px;
            opacity: 0.9;
        }

        .modal-body {
            padding: 25px;
            max-height: 50vh;
            overflow-y: auto;
            text-align: left;
        }

        .modal-body::-webkit-scrollbar {
            width: 6px;
        }

        .modal-body::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .modal-body::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        .terms-content {
            font-size: 14px;
            line-height: 1.8;
            color: #374151;
        }

        .terms-content h3 {
            color: var(--primary);
            font-size: 16px;
            margin-top: 20px;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .terms-content h3:first-child {
            margin-top: 0;
        }

        .terms-content p {
            margin: 10px 0;
        }

        .terms-content strong {
            color: #1f2937;
        }

        .modal-footer {
            padding: 20px 25px;
            background: #f9fafb;
            display: flex;
            gap: 12px;
            border-top: 1px solid #e5e7eb;
        }

        .btn-modal {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-decline {
            background: #fff;
            color: #6b7280;
            border: 1.5px solid #e5e7eb;
        }

        .btn-decline:hover {
            background: #f3f4f6;
            border-color: #d1d5db;
        }

        .btn-accept {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .btn-accept:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
        }

        .btn-accept:active {
            transform: scale(0.98);
        }
    