* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #87CEEB -10%, #4169E1 50%, #1E90FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    color: white;
    padding: 20px 30px;
    border-bottom: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.header-logo {
    height: 120px;
    width: auto;
    margin-right: 20px;
}

.header-center {
    flex-grow: 1;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    margin-top: 0;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .header-logo {
        margin-right: 0;
        margin-bottom: 15px;
        height: 120px;
    }
    
    .header-center {
        width: 100%;
    }
}

.form-container {
    padding: 40px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group {
    margin: 20px 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: #667eea;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.checkbox-item label {
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}

.btn {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);    
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.kelompok-options {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
}

.kelompok-options.show {
    display: block;
}

a.submit-btn {
    background: linear-gradient(135deg, #f5f7fa 0%, #b1bcce 100%);
    color: #4a5568;
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

a.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(195, 207, 226, 0.3);
    color: #2d3748;
}

a.info-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

a.info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

a.info-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255,255,255,0.3) 0%,
        rgba(255,255,255,0) 60%
    );
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

a.info-btn:hover::after {
    left: 100%;
    top: 100%;
}

.bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.cloud:nth-child(1) {
    width: 100px;
    height: 40px;
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.cloud:nth-child(2) {
    width: 150px;
    height: 60px;
    top: 60%;
    left: -15%;
    animation-delay: -7s;
}

.cloud:nth-child(3) {
    width: 80px;
    height: 30px;
    top: 80%;
    left: -8%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(100vw) translateY(-20px);
    }
    50% {
        transform: translateX(100vw) translateY(0);
    }
    75% {
        transform: translateX(100vw) translateY(20px);
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
}

.kode-siswa-section {
    animation: slideInDown 0.6s ease-out;
}

.generated-code-display {
    animation: bounceIn 0.8s ease-out;
}

.btn-generate, .btn-generate-new {
    transition: all 0.3s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-generate-new:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-2px);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
    .kode-siswa-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .generated-code-display h4 {
        font-size: 20px;
    }
    
    .btn-generate, .btn-generate-new {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* TAMBAHKAN CSS INI KE FILE css/pendaftaran.css */

/* File upload styling */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-wrapper .form-text {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Photo preview styling */
.foto-preview {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.foto-preview img {
    display: block;
    margin: 0 auto 10px auto;
    border: 2px solid #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn-remove-photo {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-remove-photo:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Jurusan field transition */
#jurusan-group {
    transition: all 0.3s ease;
    overflow: hidden;
}

#jurusan-group.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
    }
}

.photo-source-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-photo-source {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-photo-source:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-photo-source:active {
    transform: translateY(0);
}

.btn-photo-source i {
    font-size: 16px;
}

.file-upload-wrapper {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.foto-preview {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.btn-remove-photo {
    margin-top: 10px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove-photo:hover {
    background: #c82333;
}

@media (max-width: 480px) {
    .photo-source-buttons {
        flex-direction: column;
    }
    
    .btn-photo-source {
        width: 100%;
    }
}

#camera-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 15px 0;
}

#camera-video {
    border: 2px solid #667eea;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-photo-source {
    margin: 5px;
}

.step-info {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-info p {
    margin: 10px 0;
    line-height: 1.6;
    opacity: 0.95;
}

.step-info .highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* Style untuk keterangan field wajib */
.required-info {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.required-info i {
    font-size: 18px;
    min-width: 20px;
}

/* Auto save indicator */
.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 12px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.auto-save-indicator.show {
    opacity: 1;
}

.auto-save-indicator.saving {
    background: #ff9800;
}

.auto-save-indicator i {
    margin-right: 5px;
}

/* Improved required asterisk */
.required {
    color: #ff4444;
    font-weight: bold;
    font-size: 1.1em;
    margin-left: 2px;
}

/* Form section headers with better styling */
.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 30px 0 20px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

.modal-header {
    color: #4CAF50;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
}

.modal-wa-number {
    background: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 18px;
    margin: 15px 0;
    display: inline-block;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-wa {
    background: #25D366;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-wa:hover {
    background: #20b358;
    transform: translateY(-2px);
}

.btn-close {
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
}

.btn-close:hover {
    background: #5a6268;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@media (max-width: 600px) {
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

/* Style untuk checkbox error */
.checkbox-error {
    background-color: #ffebee !important;
    border-left: 4px solid #f44336 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
    transition: all 0.3s ease !important;
}

.checkbox-error label {
    color: #d32f2f !important;
    font-weight: 500 !important;
}

/* Pesan validasi checkbox */
.checkbox-validation-error {
    margin-bottom: 15px !important;
    animation: shake 0.5s ease-in-out !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}