:root {
    --primary-color: #8B0000;
    --secondary-color: #B8860B;
    --dark-color: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-dark: #333;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, rgba(139,0,0,0.05) 0%, rgba(184,134,11,0.05) 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    position: relative;
    z-index: 2;
}

.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6b0000 100%);
    padding: 30px 20px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-img {
    width: 285px;
    height: 100px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-right: 25px;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.institution-name {
    color: white;
    text-align: left;
}

.institution-name h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.institution-name p {
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.95;
    font-weight: 400;
}

.welcome-card {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.welcome-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.login-instruction {
    background: linear-gradient(135deg, rgba(139,0,0,0.05) 0%, rgba(184,134,11,0.05) 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.login-instruction p {
    margin: 0;
    color: var(--dark-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.mandatory-note {
    color: #dc3545;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 500;
}

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

.form-label .required {
    color: #dc3545;
    margin-left: 3px;
}

.form-control, .form-select {
    border: 2px solid #dee2e6;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 0, 0, 0.15);
    background: white;
}

.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139,0,0,0.3);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #dee2e6;
}

.divider span {
    padding: 0 15px;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.notice-section {
    margin-top: 25px;
}

.notice-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.notice-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.notice-card.international {
    border-left-color: #17a2b8;
}

.notice-card.register {
    border-left-color: var(--primary-color);
}

.notice-card h5 {
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.notice-card h5 i {
    margin-right: 10px;
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.notice-card.international h5 i {
    color: #17a2b8;
}

.notice-card.register h5 i {
    color: var(--primary-color);
}

.notice-card p {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.7;
}

.notice-card .btn {
    padding: 10px 25px;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-purchase {
    background: var(--secondary-color);
    color: white;
    border: none;
}

.btn-purchase:hover {
    background: #9a7209;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
}

.btn-international {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-international:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
    color: white;
}

.btn-register {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-register:hover {
    background: #6b0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
    color: white;
}

.footer-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.footer-section p {
    margin: 8px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.footer-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

.info-badge {
    display: inline-block;
    background: rgba(184, 134, 11, 0.1);
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
}

.register-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6b0000 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.logo-section {
    position: relative;
    z-index: 2;
}

.register-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.register-header p {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.register-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.register-body {
    padding: 40px 35px;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--light-bg);
    border: 2px solid #dee2e6;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--primary-color);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn-create-account {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6b0000 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-create-account::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-create-account:hover::before {
    width: 300px;
    height: 300px;
}

.btn-create-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.btn-create-account span {
    position: relative;
    z-index: 2;
}

.btn-create-account:disabled span {
    display: none;
}

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

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

.login-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.login-link p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.login-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.help-sidebar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    border-left: 5px solid var(--secondary-color);
}

.help-sidebar h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.help-sidebar h5 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.help-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.help-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.help-item h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.help-item p {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.help-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.help-item a:hover {
    color: var(--secondary-color);
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.password-strength {
    height: 5px;
    border-radius: 3px;
    margin-top: 8px;
    background: #e9ecef;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    background: #dc3545;
}

.password-strength-bar.weak { width: 33%; background: #dc3545; }
.password-strength-bar.medium { width: 66%; background: #ffc107; }
.password-strength-bar.strong { width: 100%; background: #28a745; }

.password-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .logo-container {
        flex-direction: column;
    }

    .logo-img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .institution-name {
        text-align: center;
    }

    .institution-name h1 {
        font-size: 1.5rem;
    }

    .welcome-card {
        padding: 25px 20px;
    }

    .register-body {
        padding: 30px 25px;
    }

    .register-header {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 1.1rem;
    }
}
