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

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
    background: linear-gradient(135deg, #073003  0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

.container {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
header {
    background: #073003;
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(107, 76, 154, 0.2);
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* ===== FORM CONTAINER ===== */
.form-registrasi {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 100%;
    animation: slideUp 0.5s ease-out;
}

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

/* ===== FORM SECTIONS ===== */
.form-registrasi h2 {
    color: #073003;
    font-size: 1.3rem;
    margin: 1.5rem 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #6b4c9a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.form-registrasi h2:first-child {
    margin-top: 0;
}

/* ===== FORM GROUP ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #073003;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6b4c9a;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(107, 76, 154, 0.1);
}

/* ===== TEXTAREA ===== */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-size: 0.9rem;
}

/* ===== SELECT DROPDOWN ===== */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b4c9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* ===== BUTTON ===== */
.button {
    background: linear-gradient(180deg, #073003 0%, #1bac0e 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 76, 154, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button:hover {
    background: linear-gradient(135deg, #5a3f8a 0%, #7a4fa5 100%);
    box-shadow: 0 6px 20px rgba(107, 76, 154, 0.4);
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(107, 76, 154, 0.2);
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #6b4c9a 0%, #8b5fbf 100%);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 12px rgba(107, 76, 154, 0.2);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* ===== FORM VALIDATION ===== */
.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
    border-color: #e0e0e0;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #073003;
}

/* ===== ALERT MESSAGES ===== */
.alert {
    padding: 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    animation: slideDown 0.3s ease-out;
}

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

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    header {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .form-registrasi {
        padding: 1.5rem;
        border-radius: 10px;
    }

    .form-registrasi h2 {
        font-size: 1.1rem;
        margin: 1rem 0 0.75rem 0;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .button {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    main {
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 1rem;
    }

    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .form-registrasi {
        padding: 1.25rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .form-registrasi h2 {
        font-size: 1rem;
        margin: 0.85rem 0 0.65rem 0;
        padding-bottom: 0.65rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .form-group textarea {
        min-height: 80px;
    }

    .button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    main {
        padding: 0.5rem 0;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
    color: #999;
    font-size: 0.85rem;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: #28a745;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #6b4c9a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a3f8a;
}

/* ===== PRINT STYLE ===== */
@media print {
    body {
        background: white;
    }

    .form-registrasi {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .button {
        display: none;
    }

    footer {
        display: none;
    }
}