/**
 * ITU MY ID - Master Stylesheet
 * https://itu.my.id
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px -5px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================
   Utility Classes
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-main);
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-dark {
    background-color: var(--dark);
    color: #ffffff;
}

.btn-dark:hover {
    background-color: var(--dark-surface);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   Alerts & Flash Messages
   ========================================== */
.flash-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: currentColor;
    opacity: 0.7;
    cursor: pointer;
}

.alert-close:hover { opacity: 1; }

/* ==========================================
   Form Controls
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ==========================================
   Landing Page Styles
   ========================================== */
.landing-nav {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
}

.brand-logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

.hero-section {
    padding: 90px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-title span {
    background: linear-gradient(135deg, #4f46e5 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
}

.hero-slug-preview {
    background: #ffffff;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 32px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 50px;
}

.feature-card {
    background: #ffffff;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-light) 0%, #e0e7ff 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ==========================================
   Auth Pages (Login & Register)
   ========================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.05) 90.5%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 38px 32px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 12px;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    padding: 28px 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    animation: modalIn 0.25s ease;
    position: relative;
    color: #0f172a;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.3rem; }
    .hero-subtitle { font-size: 1rem; }
    .modal-dialog {
        padding: 24px 18px;
        max-width: 95%;
    }
}
