/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* ===== VARIABLES ===== */
:root {
    --primary-dark: #1e3a8a;    /* Biru laut */
    --primary-light: #38bdf8;   /* Biru langit */
    --accent: #3b82f6;          /* Biru medium */
    --success: #10b981;         /* Hijau sukses */
    --warning: #f59e0b;         /* Kuning peringatan */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --input-bg: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --shadow: 0 4px 20px rgba(30, 58, 138, 0.1);
    --shadow-hover: 0 8px 30px rgba(30, 58, 138, 0.15);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== HEADER UNTUK PPDB (jika ingin ditambahkan) ===== */
.ppdb-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
    padding: 1rem 2rem;
    width: 100%;
    max-width: 1000px;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: -1rem;
    z-index: 10;
    position: relative;
}

.ppdb-header h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ppdb-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* ===== FORM CONTAINER ===== */
.form-container {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1000px;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--success));
}

.form-container h2 {
    color: var(--primary-dark);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 2px;
}

/* ===== FORM STYLES ===== */
form {
    display: grid;
    gap: 1.5rem;
}

/* ===== FORM GROUP ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label::after {
    content: '*';
    color: #ef4444;
    font-weight: bold;
    display: inline-block;
    margin-left: 0.25rem;
}

/* ===== INPUT STYLES ===== */
.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-light);
}

/* ===== SPECIAL INPUT STYLES ===== */
.form-group input[readonly] {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: #cbd5e1;
}

.form-group input[type="date"] {
    position: relative;
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.form-group input[type="tel"]:valid {
    border-color: var(--success);
}

.form-group input[type="tel"]:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* ===== TEXTAREA STYLES ===== */
.form-group textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* ===== SELECT STYLES ===== */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e3a8a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 3rem;
    cursor: pointer;
}

/* ===== HR STYLES ===== */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    margin: 2rem 0;
}

/* ===== NOTE BOX ===== */
.note-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid var(--warning);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.note-box::before {
    content: '!';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: var(--warning);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.note-box b {
    color: var(--primary-dark);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.75rem;
}

.note-box ol {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.note-box li {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.note-box li::marker {
    color: var(--warning);
    font-weight: bold;
}

/* ===== SUBMIT BUTTON ===== */
button[type="submit"] {
    background: linear-gradient(90deg, var(--success), #059669);
    color: var(--white);
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    background: linear-gradient(90deg, #059669, #047857);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

button[type="submit"]::after {
    content: '✓';
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: var(--transition);
    opacity: 0;
}

button[type="submit"]:hover::after {
    right: 30px;
    opacity: 1;
}

/* ===== FORM SECTIONS ===== */
.form-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-light);
    margin: 1.5rem 0;
}

.form-section h3 {
    color: var(--primary-dark);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    display: inline-block;
}

/* ===== GRID LAYOUT ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ===== REQUIRED FIELD INDICATOR ===== */
.required-note {
    text-align: right;
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* ===== SUCCESS MESSAGE (jika menggunakan JavaScript) ===== */
.success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--success);
    color: var(--primary-dark);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
    display: none;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message.show {
    display: block;
}

/* ===== LOADING STATE ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .form-container {
        padding: 2.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-container h2 {
        font-size: 1.8rem;
    }
    
    .ppdb-header {
        padding: 1rem;
    }
    
    .ppdb-header h1 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem 1rem;
    }
    
    button[type="submit"] {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .note-box {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-container h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .note-box {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    button[type="submit"] {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .note-box ol {
        margin-left: 1.25rem;
    }
}

/* ===== VALIDATION STYLES ===== */
.form-group input:valid:not([readonly]):not(:placeholder-shown) {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2310b981' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
    padding-right: 3rem;
}

.form-group input:invalid:not(:placeholder-shown):not([readonly]) {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ef4444' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
    padding-right: 3rem;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .form-container {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }
    
    .form-container h2 {
        color: black;
    }
    
    button[type="submit"],
    .note-box::before {
        display: none;
    }
    
    .note-box {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 1px solid #ccc;
        background: white;
        color: black;
    }
}

