/* =========================================
   STYLE.CSS - RIFQYFORMS CORE ENGINE
   Layout, Responsive, Micro-interactions
   ========================================= */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Animasi Background (Blobs) untuk efek Glassmorphism */
.bg-shape {
    position: fixed;
    filter: blur(80px);
    z-index: -1;
    border-radius: 50%;
    animation: float 10s infinite alternate ease-in-out;
}
.shape1 {
    width: 300px;
    height: 300px;
    background: var(--shape-color-1);
    top: -50px;
    left: -50px;
}
.shape2 {
    width: 400px;
    height: 400px;
    background: var(--shape-color-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Container Utama */
.form-container {
    width: 100%;
    max-width: 700px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Base Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Header */
.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Auth Box */
.auth-box {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}
.hidden {
    display: none !important;
}

/* Cards Pertanyaan */
.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.question-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.required {
    color: #ff4757;
    margin-left: 4px;
}
.question-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) / 2);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}
.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.validation-msg {
    display: block;
    color: #ff4757;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

/* Custom Radio / Checkbox */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
}
.radio-label input {
    display: none;
}
.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}
.radio-label input:checked + .custom-radio {
    border-color: var(--primary-color);
}
.radio-label input:checked + .custom-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: calc(var(--radius) / 2);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: 1rem;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}
.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}
.btn-google:hover {
    background: #f1f1f1;
}
.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--input-bg);
}

/* Footer & Bagikan Link */
.form-footer {
    text-align: center;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.share-section {
    position: relative;
}
.toast {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
}
.branding {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal Sukses */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.modal.hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.success-icon {
    font-size: 4rem;
    color: #2ed573;
    margin-bottom: 1rem;
}
.modal-content h2 { margin-bottom: 0.5rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Responsive (HP/Tablet) */
@media (max-width: 768px) {
    .glass-panel { padding: 1.5rem; }
    .form-header h1 { font-size: 1.5rem; }
    .question-title { font-size: 1rem; }
    body { padding: 1rem; }
    .shape1, .shape2 { width: 200px; height: 200px; }
}
