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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 40px;
    text-align: center;
}

.logo {
    margin-bottom: 40px;
}

.logo i {
    font-size: 48px;
    color: #DC143C;
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}

.logo p {
    color: #666;
    font-size: 14px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: #DC143C;
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-actions {
    margin-top: 32px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid #c33;
    font-size: 14px;
}

.success-message {
    background: #efe;
    color: #363;
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid #363;
    font-size: 14px;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #DC143C;
    font-size: 16px;
    margin: 20px 0;
}

.loading i {
    font-size: 20px;
}

.app-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.app-info strong {
    color: #333;
}

.footer {
    text-align: center;
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer p {
    margin-bottom: 12px;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.links a:hover {
    color: white;
    text-decoration: underline;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

#modalTitle {
    margin-bottom: 20px;
    color: #333;
}

#modalBody {
    line-height: 1.6;
    color: #666;
}

#modalBody h3 {
    color: #333;
    margin: 20px 0 10px 0;
}

#modalBody ul {
    margin: 10px 0;
    padding-left: 20px;
}

#modalBody li {
    margin: 8px 0;
}

/* reCAPTCHA */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .login-card {
        padding: 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo i {
        font-size: 40px;
    }
}

/* Animacje */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card {
    animation: fadeIn 0.6s ease-out;
}

/* Slider CAPTCHA */
.slider-captcha {
    margin-top: 8px;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 50px;
    background: #f0f0f0;
    border-radius: 25px;
    border: 2px solid #ddd;
    overflow: hidden;
    user-select: none;
    cursor: pointer;
}

.slider-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 46px;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: grab;
    transition: all 0.3s ease;
    z-index: 2;
}

.slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
}

.slider-track.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
}

.slider-track.success .slider-text {
    color: white;
}

.slider-track.success .slider-thumb {
    background: #4CAF50;
}

.slider-track.success .slider-thumb i::before {
    content: "\f00c"; /* checkmark */
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
