/* University of Dhaka Color Scheme */
:root {
    --du-primary: #1e3a8a;
    --du-secondary: #f59e0b;
    --du-accent: #059669;
    --du-light: #f8fafc;
    --du-dark: #1e293b;
}

/* Custom Bootstrap Theme */
.bg-primary {
    background-color: var(--du-primary) !important;
}

.btn-primary {
    background-color: var(--du-primary);
    border-color: var(--du-primary);
}

.btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
}

.text-primary {
    color: var(--du-primary) !important;
}

.border-info {
    border-color: var(--du-secondary) !important;
}

.text-info {
    color: var(--du-secondary) !important;
}

/* Body styling */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header styling */
.navbar-brand {
    font-weight: 600;
}

.navbar-brand small {
    font-size: 0.75rem;
    opacity: 0.9;
}

.logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Card styling */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(135deg, var(--du-primary) 0%, #1e40af 100%);
}

.card-body {
    background-color: white;
}

/* Form styling */
.form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 6px 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--du-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Input group styling */
.input-group .btn {
    border-radius: 0 8px 8px 0;
}

/* Link styling */
a {
    color: var(--du-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: #1e40af;
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, var(--du-dark) 0%, #0f172a 100%) !important;
}

footer h6 {
    color: var(--du-secondary);
    font-weight: 600;
}

footer a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--du-secondary);
}

/* Shadow effects */
.shadow-lg {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Animation for icons */
.bi {
    transition: transform 0.3s ease;
}

.card-header .bi {
    animation: pulse 2s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand div {
        font-size: 0.9rem;
    }

    .navbar-brand small {
        font-size: 0.7rem;
    }

    .logo {
        height: 40px;
    }

    .card {
        margin: 0 15px;
    }

    .captcha-input {
        min-width: 90px;
    }

    .captcha-display {
        font-size: 0.9rem;
        padding: 6px 8px;
    }
}

/* Extra small screens (320px and below) */
@media (max-width: 320px) {
    .captcha-input {
        min-width: 70px;
        padding: 8px 4px;
        font-size: 0.9rem;
    }

    .captcha-display {
        font-size: 0.8rem;
        padding: 6px 4px;
    }

    .captcha-inline {
        gap: 4px;
    }
}

/* Loading animation */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Focus styles for accessibility */
.form-control:focus,
.btn:focus {
    outline: none;
}

/* Custom checkbox styling */
.form-check-input:checked {
    background-color: var(--du-primary);
    border-color: var(--du-primary);
}

/* Social media icons */
footer .bi:hover {
    transform: scale(1.2);
    color: var(--du-secondary);
}

/* CAPTCHA styling */
.captcha-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.captcha-display {
    background: linear-gradient(135deg, var(--du-light) 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--du-primary);
    text-align: center;
    user-select: none;
    white-space: nowrap;
    flex: 1;
}

.captcha-display:hover {
    border-color: var(--du-primary);
}

.captcha-input {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 51px;
}

#refreshCaptcha {
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#refreshCaptcha:hover {
    background-color: var(--du-primary);
    border-color: var(--du-primary);
    color: white;
    transform: rotate(180deg);
}

/* Success/Error states */
.is-valid {
    border-color: var(--du-accent) !important;
}

.is-invalid {
    border-color: #dc2626 !important;
}