@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    --panel-bg: rgba(30, 41, 59, 0.45);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-orange: #ff6f00;
    --success: #10b981;
    --error: #ef4444;
    --font-sans: 'Inter', sans-serif;
    --glow-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Background decorative circles */
.circle-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 15%;
    left: 20%;
}

.circle-2 {
    width: 350px;
    height: 350px;
    background: #a855f7;
    bottom: 15%;
    right: 20%;
}

/* Main glassmorphism container */
.container {
    width: 100%;
    max-width: 580px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--glow-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-orange), transparent);
    transition: left 0.7s ease;
}

.container:hover::before {
    left: 100%;
}

/* Logo and Header styling */
.header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.logo-digilocker {
    height: 42px;
}

.app-badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 10px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Verification Mode Tabs */
.tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Forms layout */
.form-group {
    margin-bottom: 25px;
    display: none;
}

.form-group.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
}

.input-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 16px 16px 46px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.input-field::placeholder {
    color: #475569;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Indicator for Mock Mode */
.mode-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mode-mock {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.mode-live {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

/* Mock DigiLocker Portal Design (Inside mock_digilocker.php) */
.mock-portal {
    background: #ffffff;
    color: #333333;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: none;
}

.mock-header {
    background: #0f4c81;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mock-logo {
    height: 32px;
}

.mock-body {
    padding: 30px;
}

.mock-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f4c81;
    margin-bottom: 20px;
    text-align: center;
}

.mock-input {
    width: 100%;
    border: 1px solid #cccccc;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.mock-btn {
    width: 100%;
    background: #e65100;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

.mock-btn:hover {
    background: #f57c00;
}

.mock-consent-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #0f4c81;
}

/* Callback / Results Page Styles */
.results-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.profile-meta h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.profile-meta p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.doc-section-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.doc-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.doc-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
    background: rgba(15, 23, 42, 0.6);
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.doc-icon {
    font-size: 1.8rem;
    color: var(--accent-orange);
}

.doc-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.doc-issuer {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-view {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-back {
    display: block;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design Queries */
@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start; /* Better scrolling on tall forms on small devices */
    }

    .container {
        padding: 24px 18px;
        border-radius: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .tabs {
        padding: 4px;
        margin-bottom: 20px;
    }

    .tab-btn {
        padding: 10px 6px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .input-field {
        padding: 14px 14px 14px 42px;
        font-size: 0.95rem;
    }

    .input-icon {
        left: 14px;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding-bottom: 15px;
    }

    .profile-meta h2 {
        font-size: 1.15rem;
    }

    .profile-meta p {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .doc-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .doc-info {
        gap: 10px;
    }

    .doc-icon {
        font-size: 1.5rem;
    }

    .doc-name {
        font-size: 0.9rem;
    }

    .btn-view {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}
