/* Government of India Theme CSS */
/* Following GIGW Guidelines and Digital India Design Standards */

:root {
    /* Indian Flag Colors */
    --saffron: #FF9933;
    --white: #FFFFFF;
    --green: #138808;
    --navy-blue: #000080;
    
    /* Red Theme Colors */
    --primary-red: #B91C1C;
    --light-red: #DC2626;
    --dark-red: #7F1D1D;
    --red-bg: #FEF2F2;
    
    /* Digital India Palette - Replaced with Red */
    --digital-blue: #B91C1C; /* Changed to red */
    --digital-light-blue: #DC2626; /* Changed to light red */
    --digital-sky: #FEF2F2; /* Changed to light red background */
    
    /* Grays for Government Theme */
    --gray-900: #1F2937;
    --gray-800: #374151;
    --gray-700: #4B5563;
    --gray-600: #6B7280;
    --gray-500: #9CA3AF;
    --gray-400: #D1D5DB;
    --gray-300: #E5E7EB;
    --gray-200: #F3F4F6;
    --gray-100: #F9FAFB;
    --gray-50: #F9FAFB;
    
    /* Functional Colors */
    --success: #059669;
    --error: #DC2626;
    --warning: #D97706;
    --info: #2563EB;
    
    /* Typography */
    --font-primary: 'Open Sans', 'Noto Sans', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Government Header */
.goi-header-unique {
    background: var(--white);
    border-bottom: 1px solid var(--primary-red);
    box-shadow: var(--shadow-sm);
    padding: 0.25rem 0;
}

.goi-header-content-unique {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.goi-emblem-section-unique {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.goi-emblem-unique {
    height: 35px;
    width: auto;
    max-width: 200px;
}

.goi-title-section-unique {
    display: flex;
    flex-direction: column;
}

.goi-title-unique {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-red);
    line-height: 1.1;
    margin: 0;
}

.goi-subtitle-unique {
    font-size: 0.6rem;
    color: var(--gray-600);
    margin: 0;
}

.goi-hindi-title-unique {
    font-size: 0.8rem;
    color: var(--primary-red);
    font-weight: 500;
    margin: 0;
}

/* Clean Login Container */
.goi-login-container-clean {
    max-width: 450px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.goi-login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.goi-login-header-clean {
    text-align: center;
    margin-bottom: 2rem;
}

.goi-login-header-clean h2 {
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.goi-login-header-clean p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

/* Clean Form Elements */
.goi-form-group-clean {
    margin-bottom: 1.5rem;
}

.goi-form-label-clean {
    display: block;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.goi-form-input-clean {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.goi-form-input-clean:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.goi-form-input-clean.error {
    border-color: var(--error);
}

.error-text-clean {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.goi-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.goi-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.goi-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-red);
}

.goi-forgot-link {
    color: var(--primary-red);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.goi-forgot-link:hover {
    text-decoration: underline;
}

.goi-captcha-section {
    margin-bottom: 1.5rem;
}

.goi-captcha-container {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.goi-captcha-container i {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.goi-captcha-container p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.captcha-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--success);
}

.captcha-status i {
    font-size: 1rem;
}

/* OTP Specific Styles */
.goi-otp-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.goi-otp-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.goi-masked-contact {
    font-weight: 600;
    color: var(--primary-red) !important;
    font-size: 1rem !important;
}

.goi-otp-input-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.goi-otp-single-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.3s ease;
}

.goi-otp-single-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.goi-otp-single-input:invalid {
    border-color: var(--error);
}

.goi-form-back-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.goi-back-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.goi-back-link:hover {
    color: var(--dark-red);
    text-decoration: none;
}

.goi-back-link i {
    font-size: 0.9rem;
}

.goi-resend-otp {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.goi-resend-otp p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.goi-resend-otp a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.goi-resend-otp a:hover {
    text-decoration: underline;
}

.goi-security-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.goi-security-tips h6 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 600;
}

.goi-security-tips ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.goi-security-tips li {
    margin: 0.25rem 0;
}

.goi-btn-clean {
    width: 100%;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.goi-btn-clean:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
}

.goi-btn-clean:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.goi-login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.goi-login-footer p {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0;
}

.goi-login-footer a {
    color: var(--primary-red);
    text-decoration: none;
}

.goi-login-footer a:hover {
    text-decoration: underline;
}

.goi-new-student {
    text-align: center;
    margin-top: 1rem;
}

.goi-new-student p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.goi-new-student a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
}

.goi-new-student a:hover {
    text-decoration: underline;
}

/* Responsive Design for Clean Login */
@media (max-width: 768px) {
    .goi-login-container-clean {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .goi-login-card {
        padding: 1.5rem;
    }
    
    .goi-login-header-clean h2 {
        font-size: 1.25rem;
    }
}

/* Old Login Container - Keep for backward compatibility */
.goi-login-container {
    max-width: 1100px;
    margin: 1.5rem auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.goi-login-left {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.goi-login-right {
    background: var(--red-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.goi-login-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeIn 0.6s ease-out;
}

.goi-login-header {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--light-red) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.goi-login-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.goi-login-header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.goi-login-body {
    padding: 0;
    flex: 1;
}

/* Notification bubble */
.goi-notification-bubble {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-md);
    max-width: 300px;
    z-index: 10;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

@media (max-width: 992px) {
    .goi-login-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .goi-login-right {
        display: none;
    }
}

/* Form Elements */
.goi-form-group {
    margin-bottom: 1rem;
}

.goi-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.goi-form-label .required {
    color: var(--error);
}

.goi-form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    background-color: var(--gray-50);
}

.goi-form-input:focus {
    outline: none;
    border-color: var(--light-red);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
    background-color: var(--white);
}

.goi-form-input.error {
    border-color: var(--error);
}

.goi-input-group {
    position: relative;
}

.goi-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 1.25rem;
}

.goi-input-group .goi-form-input {
    padding-left: 3rem;
}

/* Buttons */
.goi-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.goi-btn-primary {
    background: #FBBF24; /* Yellow button like in the design */
    color: var(--gray-900);
}

.goi-btn-primary:hover {
    background: #F59E0B;
    box-shadow: var(--shadow-md);
}

.goi-btn-secondary {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.goi-btn-secondary:hover {
    background: var(--primary-red);
    color: var(--white);
}

.goi-btn-block {
    display: block;
    width: 100%;
}

/* Security Badge */
.goi-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.goi-security-badge i {
    color: var(--success);
    font-size: 1.25rem;
}

/* Notification System */
.goi-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 350px;
    max-width: 90%;
}

/* Alert Messages */
.goi-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.goi-alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    animation: shrink 5s linear forwards;
}

@keyframes shrink {
    from { width: 100%; }
    to { width: 0%; }
}

.goi-alert i {
    font-size: 1.25rem;
}

.goi-alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.goi-alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--error);
}

.goi-alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

.goi-alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

main {
    flex: 1 0 auto; /* Takes up available space */
    display: flex;
    flex-direction: column;
}

/* Footer */
.goi-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 0;
    margin-top: auto;
    flex-shrink: 0; /* Prevents footer from shrinking */
}

.goi-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.goi-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.goi-footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.goi-footer-links a:hover {
    color: var(--white);
}

.goi-footer-copyright {
    font-size: 0.75rem;
    color: var(--gray-400);
}

@media (max-width: 768px) {
    .goi-footer-content {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* OTP Input Boxes */
.goi-otp-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.goi-otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: pulse 1s ease-in-out;
}

.goi-otp-input:nth-child(1) { animation-delay: 0.1s; }
.goi-otp-input:nth-child(2) { animation-delay: 0.2s; }
.goi-otp-input:nth-child(3) { animation-delay: 0.3s; }
.goi-otp-input:nth-child(4) { animation-delay: 0.4s; }
.goi-otp-input:nth-child(5) { animation-delay: 0.5s; }
.goi-otp-input:nth-child(6) { animation-delay: 0.6s; }

.goi-otp-input:focus {
    outline: none;
    border-color: var(--light-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Timer */
.goi-timer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 1rem 0;
}

.goi-timer-count {
    font-weight: 600;
    color: var(--primary-red);
}

/* Captcha Container */
.goi-captcha-container {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.goi-captcha-image {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.goi-captcha-image img {
    border: 2px solid var(--gray-300);
    border-radius: 4px;
}

.goi-captcha-refresh {
    background: var(--white);
    border: 2px solid var(--gray-300);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goi-captcha-refresh:hover {
    background: var(--gray-100);
}

/* Responsive Design */
@media (max-width: 768px) {
    .goi-header-content-unique {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .goi-emblem-section-unique {
        flex-direction: column;
    }
    
    .goi-emblem-unique {
        height: 50px;
        max-width: 250px;
    }
    
    .goi-title-unique {
        font-size: 1.25rem;
    }
    
    .goi-login-container {
        margin: 1rem;
        max-width: 100%;
    }
    
    .goi-footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Loading Spinner */
.goi-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Page Transitions */
.page-transition {
    animation: fadeIn 0.4s ease-out;
}

/* Smooth scrolling for the entire site */
html {
    scroll-behavior: smooth;
}

/* Apply animations to elements */
.goi-login-container {
    animation: fadeIn 0.4s ease-out;
}

.goi-form-group {
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
}

.goi-form-group:nth-child(1) { animation-delay: 0.1s; }
.goi-form-group:nth-child(2) { animation-delay: 0.2s; }
.goi-form-group:nth-child(3) { animation-delay: 0.3s; }
.goi-form-group:nth-child(4) { animation-delay: 0.4s; }

.goi-btn {
    transition: all 0.2s ease;
}

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

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

.goi-login-header {
    animation: fadeIn 0.3s ease-out;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Skip to Content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Language Switcher */
.goi-language-switcher-unique {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.goi-language-btn-unique {
    padding: 0.25rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goi-language-btn-unique:hover {
    background: var(--gray-100);
}

.goi-language-btn-unique.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}
