/* CSS Variables & Themes */
:root {
    --bg-color: #fcf9f5;
    --text-color: #2c2c2c;
    --text-muted: #6b6b6b;
    --accent-color: #1a3c34; /* Deep Emerald Green */
    --accent-hover: #2a5a4f;
    --gold: #c5a059;
    --card-bg: rgba(255, 255, 255, 0.85);
    --nav-bg: rgba(252, 249, 245, 0.85);
    --border-color: #e0d8ce;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-script: 'Great Vibes', cursive;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-color: #c5a059; /* Gold as primary in dark mode */
    --accent-hover: #d4b47a;
    --card-bg: rgba(30, 30, 30, 0.85);
    --nav-bg: rgba(18, 18, 18, 0.85);
    --border-color: #333;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-radius: 50px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.blur-nav {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.divider {
    color: var(--gold);
    margin: 0 5px;
}

.sub-logo {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Landing Container */
.landing-container {
    display: flex;
    min-height: 100vh;
    padding-top: 100px;
}

.left-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 50vh;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.info-text h2 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 15px;
}

.info-text p {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.aesthetic-images {
    display: flex;
    gap: 15px;
}

.aesthetic-images img {
    width: 30%;
    border-radius: 15px;
    object-fit: cover;
    height: 150px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.aesthetic-images img:hover {
    transform: translateY(-5px);
}

/* Right Panel - Auth */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .auth-container {
    background: #1e1e1e;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    font-weight: 700;
}

.auth-form {
    display: none;
    animation: fadeIn 0.5s;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
    color: var(--text-color);
}

.auth-form p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.admin-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 0.8rem;
}

.admin-hint a {
    color: var(--gold);
    text-decoration: none;
}

/* ============================================================
   REAL-TIME CLOCK — RESPONSIVE
   ============================================================ */
.realtime-clock {
    /* Desktop: absolute di kanan bawah panel */
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    z-index: 5;
    transition: all 0.3s ease;
    white-space: nowrap;
}

[data-theme="dark"] .realtime-clock {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   TABLET (max 900px)
   ============================================================ */
@media (max-width: 900px) {
    .realtime-clock {
        position: relative;      /* Lepas dari absolute */
        bottom: auto;
        right: auto;
        display: inline-block;
        margin: 20px auto 0 auto; /* Center */
        font-size: 1rem;
        padding: 6px 14px;
        letter-spacing: 1.5px;
    }
    
    .right-panel {
        /* Supaya jam sejajar di tengah bawah form */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 30px;
    }
}

/* ============================================================
   MOBILE (max 600px)
   ============================================================ */
@media (max-width: 600px) {
    .realtime-clock {
        font-size: 0.9rem;
        padding: 6px 12px;
        letter-spacing: 1px;
        margin-top: 15px;
        border-radius: 20px;
    }
    
    .right-panel {
        padding: 20px 15px 30px 15px;
    }
}

/* ============================================================
   MOBILE KECIL (max 400px)
   ============================================================ */
@media (max-width: 400px) {
    .realtime-clock {
        font-size: 0.8rem;
        padding: 5px 10px;
        letter-spacing: 0.5px;
    }
}

/* Footer */
.main-footer {
    background: var(--accent-color);
    color: #fff;
    padding: 40px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: #fff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--gold);
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .landing-container {
        flex-direction: column;
    }
    .right-panel {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .navbar {
        width: 95%;
        padding: 10px 20px;
    }
    .sub-logo {
        display: inline;
    }
}

@media (max-width: 600px) {
    .video-wrapper {
        height: 30vh;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .aesthetic-images img {
        height: 100px;
    }
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ============================================================
   NAVBAR & HOMEPAGE MOBILE FIX
   ============================================================ */
@media (max-width: 768px) {
    /* Navbar lebih compact */
    .navbar {
        top: 10px;
        width: 95%;
        padding: 10px 15px;
        border-radius: 30px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .sub-logo {
        display: inline;     
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .icon-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Homepage container */
    .landing-container {
        flex-direction: column;
        padding-top: 80px;
    }
    
    .left-panel {
        padding: 20px;
    }
    
    .video-wrapper {
        height: 40vh;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .aesthetic-images {
        gap: 8px;
    }
    
    .aesthetic-images img {
        height: 90px;
    }
    
    .right-panel {
        padding: 20px;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .auth-container {
        padding: 25px 20px;
    }
    
    .auth-container h2 {
        font-size: 1.3rem;
    }
    
    
    /* Footer */
    .main-footer {
        padding: 25px 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .aesthetic-images img {
        height: 70px;
    }
    
    .auth-tabs {
        font-size: 0.85rem;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 8px 5px;
    }
}

/* ============================================================
   TOGGLE PASSWORD (ICON MATA) — FIXED
   ============================================================ */

/* Beri ruang di kanan input agar teks tidak ketutup ikon */
.input-group input[type="password"],
.input-group input.password-visible {
    padding-right: 48px !important;
}

/* Tombol toggle — reset semua style default */
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 2;
}

/* ============================================================
 Reset icon 
   ============================================================ */
.toggle-password i,
.toggle-password svg,
.toggle-password::before,
.toggle-password::after {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: 1rem;
    line-height: 1;
    display: block;
    pointer-events: none;
    background: transparent !important;
}

/* Hover state */
.toggle-password:hover {
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] .toggle-password:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Fokus keyboard */
.toggle-password:focus,
.toggle-password:focus-visible {
    color: var(--accent-color);
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile */
@media (max-width: 768px) {
    .input-group input[type="password"],
    .input-group input.password-visible {
        padding-right: 42px !important;
    }
    
    .toggle-password {
        right: 6px;
        width: 30px;
        height: 30px;
    }
    
    .toggle-password i,
    .toggle-password svg {
        font-size: 0.9rem;
    }
}

