:root {
    --primary-color: #1a5276;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-color: #dee2e6;
    --gradient-start: #1a5276;
    --gradient-end: #2980b9;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-gov {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.pledge-counter {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px 50px;
    display: inline-block;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.counter-number {
    font-size: 3.5rem;
    font-weight: 700;
    display: block;
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-pledge {
    background: var(--accent-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-pledge:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
    color: white;
}

.btn-outline-pledge {
    border: 2px solid white;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 50px;
    color: white;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    align-content: center;
}

.btn-outline-pledge:hover {
    background: white;
    color: var(--primary-color);
}

.card-custom {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.form-control-lg {
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-lg:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.language-switcher {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 5px;
}

.language-switcher .btn {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.language-switcher .btn.active {
    background: white;
    color: var(--primary-color);
}

.pledge-box {
    background: linear-gradient(to bottom, #fff9e6, #fff);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 30px;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
}

.pledge-text {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
}

.pledge-scroll {
    animation: scrollText 30s linear infinite;
}

@keyframes scrollText {

    0%,
    10% {
        transform: translateY(0);
    }

    90%,
    100% {
        transform: translateY(calc(-100% + 200px));
    }
}

.audio-player {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.audio-player:hover {
    transform: scale(1.05);
}

.audio-player i {
    font-size: 1.5rem;
}

.consent-box {
    background: #e8f4f8;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--secondary-color);
}

.consent-box .form-check-input {
    width: 24px;
    height: 24px;
    margin-right: 15px;
}

.consent-box .form-check-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.certificate-preview {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    border: 5px solid #d4af37;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificate-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 15px;
}

.certificate-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.certificate-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Georgia', serif;
}

.certificate-text {
    font-size: 1.1rem;
    color: #555;
    margin: 20px 0;
}

.certificate-id {
    background: var(--primary-color);
    color: white;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.otp-input {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-input input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.otp-input input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2);
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

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

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
}

.step.active .step-number {
    background: var(--secondary-color);
    color: white;
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.step-line {
    width: 80px;
    height: 3px;
    background: var(--border-color);
}

.step.completed+.step .step-line,
.step.active+.step .step-line {
    background: var(--secondary-color);
}

.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    width: 250px;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 25px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.admin-sidebar .nav-link i {
    width: 25px;
    margin-right: 10px;
}

.admin-content {
    margin-left: 250px;
    padding: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent, rgba(41, 128, 185, 0.1));
    border-radius: 0 15px 0 100%;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #666;
    font-size: 0.95rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-icon.green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-icon.red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.data-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.data-table th {
    padding: 15px 20px;
    font-weight: 600;
    border: none;
}

.data-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.filter-bar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.export-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.export-btn.excel {
    background: #1d6f42;
    color: white;
}

.export-btn.csv {
    background: #2980b9;
    color: white;
}

.export-btn.pdf {
    background: #c0392b;
    color: white;
}

footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.alert-custom {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.success-animation {
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 50px 20px;
    }

    .counter-number {
        font-size: 2.5rem;
    }

    .pledge-counter {
        padding: 20px 30px;
    }

    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }

    .admin-content {
        margin-left: 0;
    }

    .certificate-name {
        font-size: 1.8rem;
    }

    .stat-card {
        margin-bottom: 15px;
    }
}

.form-floating>.form-control {
    border-radius: 10px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= OTP VERIFICATION UI ================= */

.otp-info {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Card optimization */
.card {
    border-radius: 12px;
    border: none;
}

/* Input & button touch-friendly */
input.form-control {
    padding: 12px;
    font-size: 1rem;
}

button.btn {
    padding: 12px;
    font-size: 1.05rem;
    border-radius: 8px;
}

/* Mobile layout fixes */
@media (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .card {
        padding: 20px !important;
    }

    h4 {
        font-size: 1.25rem;
    }

    .otp-info {
        font-size: 0.9rem;
    }
}