﻿*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #007AFF;
    --secondary: #32D74B;
    --error: #FF453A;
    --background: #F5F5F7;
    --card-bg: #FFFFFF;
    --text: #1D1D1F;
    --text-secondary: #86868B;
    --border: #E5E5EA;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #007AFF 0%, #0040DD 100%);
}

@font-face {
    font-family: 'Bahij Helvetica Neue-Roman';
    src: url('../fonts/Bahij Helvetica Neue-Roman.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    margin: 0;
    font-family: 'Bahij Helvetica Neue-Roman', sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    animation: fadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.university-brand {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 120px;
    height: calc(120px / 1.13857677903);
    object-fit: contain;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0;
    color: var(--text);
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
    font-weight: 400;
}

.input-group {
    width: 100%;
    position: relative;
    padding: 0;
}

.input-wrapper {
    margin-bottom: 20px;
}

.floating-label input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    font-size: 16px;
    transition: all 0.2s ease;
    display: block;
    margin: 0;
    line-height: 1.5; /* Ensure text is vertically centered */
}

    .floating-label input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
    }

.floating-label label {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--card-bg);
    padding: 0 8px;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 13px;
    color: var(--primary);
}

.error-help {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

    .error-help i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }

.has-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.15) !important;
}

.error-help span {
    display: block;
    margin-top: 0.2rem;
}


.submit-btn {
    margin-top: 10px;
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bahij Helvetica Neue-Roman', sans-serif;
}

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .submit-btn:not(:disabled):hover {
        opacity: 0.9;
        transform: scale(0.98);
    }

    .submit-btn .fa-spinner {
        margin-right: 8px;
        font-size: 20px;
    }


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    position: relative;
    border: 1px solid var(--border);
}

.result-badge {
    font-size: 20px;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .result-badge.passed {
        background: rgba(50, 215, 75, 0.1);
        color: var(--secondary);
    }

    .result-badge.failed {
        background: rgba(255, 69, 58, 0.1);
        color: var(--error);
    }

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

    .detail-item .label i {
        margin-right: 8px;  
        color: var(--primary);
    }

    .detail-item .value {
        font-weight: 600;
        color: var(--text);
    }

.security-stamp {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .security-stamp i {
        color: var(--secondary);
    }

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

    .close-btn:hover {
        color: var(--text);
    }

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    .card {
        padding: 24px;
        border-radius: 20px;
    }

    .title {
        font-size: 24px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    position: relative;
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.result-card {
    text-align: center;
}

.result-badge {
    font-size: 20px;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .result-badge.passed {
        background: rgba(50, 215, 75, 0.1);
        color: var(--secondary);
    }

    .result-badge.failed {
        background: rgba(255, 69, 58, 0.1);
        color: var(--error);
    }

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

    .detail-item .label {
        display:flex;
        align-items: center;
        gap: 10px;
    }
    .detail-item .label i {
        margin-right: 12px;
        color: var(--primary);
    }

    .detail-item .value {
        margin-left: 3vw;
        font-weight: 600;
        color: var(--text);
    }

.security-stamp {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .security-stamp i {
        color: var(--secondary);
    }


.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .notification-container.show {
        opacity: 1;
    }

.notification {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

    .notification.success {
        border-color: var(--secondary);
        color: var(--secondary);
    }

    .notification.error {
        border-color: var(--error);
        color: var(--error);
    }

    .notification i {
        font-size: 20px;
    }


.detail-item.attendance {
    display: flex;
    align-items: center;
    gap: 10px; /* Adjust the gap as needed */
}

.detail-item.attendance > .value {
        display: flex;
        align-items: center;
        gap: 5px; /* Adjust the gap between the icon and the text as needed */
    }

    .detail-item.attendance .text-success {
        color: green;
    }

    .detail-item.attendance .text-danger {
        color: red;
    }

.poweredbysection {
    display: block;
    text-align: center;
    margin-top: 20px; /* Space between the button and this section */
    font-size: 14px;
    color: #666; /* Text color */
}

    .poweredbysection a {
        color: #007BFF; /* Link color */
        text-decoration: none; /* Remove underline from link */
        font-weight: bold;
    }

.poweredbysection a:hover {
    text-decoration: underline; /* Underline on hover */
}

.recaptcha-container {
    height: 78px; /* Default height for larger screens */
    margin-bottom: 20px;
}

/* Media query for mobile screens */
@media (max-width: 768px) {
    .recaptcha-container {
        height: auto; /* Adjust the height as needed for mobile screens */
        margin-bottom: 10px; /* Adjust the margin as needed */
    }

    #recaptcha-container {
        transform: scale(0.77); /* Scale down the reCAPTCHA */
        transform-origin: 0 0; /* Ensure the scaling starts from the top-left corner */
    }
}
