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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7f3;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

/* Header dengan Foto */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.header-photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.photo-space {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    position: relative;
}

.photo-space img,
.header-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

h1 {
    color: #333;
    text-align: center;
    margin: 20px auto 30px;
    font-size: clamp(1.4rem, 2.8vw, 2.3rem);
    line-height: 1.4;
    font-weight: 600;
    max-width: 32rem;
}

/* Form Login */
.login-form-container {
    margin-bottom: 30px;
}

.login-form {
    background: white   ;
    padding: 30px;
    border-radius: 12px;
    color: white;
}

/* Form Data Siswa */
.student-form-container {
    margin-bottom: 30px;
}

.student-form {
    background: white   ;
    padding: 30px;
    border-radius: 12px;
    color: white;
}

/* Dropdown Search */
.dropdown-search-container {
    position: relative;
    width: 100%;
}

.dropdown-search-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.dropdown-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dropdown-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.dropdown-search-results.show {
    display: block;
}

.dropdown-search-item {
    padding: 12px 15px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-search-item:last-child {
    border-bottom: none;
}

.dropdown-search-item:hover {
    background: #f8f9fa;
}

.dropdown-search-item.selected {
    background: #667eea;
    color: white;
}

.student-form h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5em;
    color: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1em;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    opacity: 0.9;
    font-style: italic;
}

.btn-start {
    width: 100%;
    padding: 15px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Info Siswa Card */
.student-info {
    margin-bottom: 30px;
}

.student-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: white   ;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.student-details {
    flex: 1;
}

.student-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.student-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 500;
}

.student-details p {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.btn-edit {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-edit:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-info {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-info:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(220, 53, 69, 0.2);
    color: white;
    border: 2px solid rgba(220, 53, 69, 0.5);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-logout:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: translateY(-2px);
}

.date-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: white   ;
    border-radius: 8px;
    color: white;
}

.date-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.date-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.date-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.date-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.date-btn .date-label {
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: 500;
}

.date-btn.active .date-label {
    opacity: 1;
}

.date-btn .date-value {
    font-size: 1em;
    font-weight: 600;
}

.date-info p {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
}

.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    color: #667eea;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tab-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn.filled {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.tab-btn.filled .check-icon {
    display: inline-block;
    color: white;
    font-weight: bold;
}

.tab-btn.active.filled {
    background: #28a745;
    color: white;
}

.tab-btn.active.filled .check-icon {
    color: white;
}

.check-icon {
    display: none;
    font-size: 1.1em;
}

.form-section {
    display: none;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.form-section h2 {
    color: #444;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-label:hover,
.checkbox-label:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-label span,
.checkbox-label span {
    font-size: 1em;
    color: #555;
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-submit,
.btn-reset {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-submit {
    background: white   ;
    color: white;
}

/* Floating WhatsApp icon */
.wa-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    text-decoration: none;
    z-index: 2000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.wa-floating svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.result-container h3 {
    color: #1976D2;
    margin-bottom: 15px;
}

.result-container pre {
    background: white;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Popup Subscribe YouTube */
.youtube-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.popup-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.popup-body {
    text-align: center;
    padding: 10px 0;
}

.popup-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.popup-body h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.popup-body p {
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.6;
    font-size: 0.95em;
}

.btn-youtube {
    display: inline-block;
    padding: 12px 30px;
    background: #FF0000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
    background: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* Info Popup Dropdown */
.info-buttons {
    width: 100%;
}

.info-dropdown-btn {
    width: 100%;
    padding: 15px 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.info-dropdown-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.info-dropdown-btn.active {
    background: #667eea;
    color: white;
}

.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.info-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    margin-top: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-text {
    color: #333;
    line-height: 1.8;
}

.dropdown-text h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.dropdown-text ol,
.dropdown-text ul {
    padding-left: 25px;
    margin: 10px 0;
}

.dropdown-text li {
    margin: 8px 0;
}

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

    .date-buttons {
        flex-direction: column;
    }
    
    .date-btn {
        width: 100%;
        min-width: auto;
    }

    .form-section {
        padding: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
    }
    
    .student-form {
        padding: 20px;
    }
    
    .student-card {
        flex-direction: column;
        text-align: center;
    }
    
    .student-details {
        text-align: center;
    }
    
    .student-actions {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }
    
    .btn-edit,
    .btn-info,
    .btn-logout {
        width: 100%;
        flex: 1;
    }
    
    .photo-space {
        max-width: 100%;
        height: 150px;
    }
    
    .popup-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .popup-icon {
        font-size: 50px;
    }
    
    .popup-body h3 {
        font-size: 1.2em;
    }
    
    .popup-body p {
        font-size: 0.9em;
    }
    
    .btn-youtube {
        width: 100%;
        padding: 15px;
    }
    
    .popup-content {
        max-width: 95% !important;
    }
    
    .dropdown-text {
        font-size: 0.9em;
    }
    
    .dropdown-content {
        padding: 15px;
    }
}

