html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #d11a1a 0%, #26ce59 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 100vh;
}

/* Animated gradient background */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Entrance animation */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    60% {
        transform: translateX(10%);
    }
    80% {
        transform: translateX(-5%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glass effect circles */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 0;
}

body::before {
    top: -100px;
    right: -100px;
}

body::after {
    bottom: -100px;
    left: -100px;
}

.container {
    width: 100%;
    max-width: 800px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    animation: slideIn 1.2s ease-out forwards;
}

.row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
}

.col-md-4 {
    width: 100%;
    max-width: 500px;
    min-width: 380px;
    padding: 15px;
    box-sizing: border-box;
}

.custom-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 30px 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.custom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.custom-card:hover::before {
    left: 100%;
}

.custom-card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-header {
    background: transparent;
    border-bottom: none;
    font-size: 2rem;
    color: #fff;
    padding: 0 0 20px 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

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

h2 {
    font-size: 1.8rem;
    margin: 0 0 30px 0;
    color: #fff !important;
    text-align: center;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.form-label {
    color: #fff;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-size: 1rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.alert-danger {
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.mb-3 {
    margin-bottom: 1.8rem;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 500px;
        max-width: 500px;
    }
    
    .container {
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 20px;
    }
    
    .custom-card {
        padding: 25px 30px;
    }
    
    h2 {
        font-size: 1.5rem;
    }

    .col-md-4 {
        min-width: 350px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .col-md-4 {
        min-width: 300px;
        padding: 10px;
    }
    
    .custom-card {
        padding: 20px 25px;
        border-radius: 20px;
    }
    
    .card-header {
        font-size: 1.6rem;
        padding: 0 0 15px 0;
    }
    
    h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 15px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Error Modal Styling */
.error-modal {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
}

.error-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
}

.error-modal .modal-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.error-modal .modal-body {
    padding: 1.5rem;
}

.error-modal .btn-close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
    filter: invert(1) grayscale(100%) brightness(200%);
}

.error-modal .btn-close:hover {
    opacity: 1;
}

.error-message {
    color: #fff;
    background: rgba(220, 53, 69, 0.2);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.error-message:last-child {
    margin-bottom: 0;
}

.error-message i {
    margin-right: 10px;
    color: #dc3545;
    font-size: 1.2rem;
}

.error-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
}

.error-modal .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.error-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Animation for modal */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.countdown-timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

.timer-display {
    font-size: 2.5em;
    color: #dc3545;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

#timer {
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

#timer {
    animation: pulse 1s infinite;
}

