:root {
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #10b981;
    --primary-hover: #059669;
    --secondary: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for Aesthetic */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary), transparent);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary), transparent);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
}

.nav-links a.active {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-links .btn-scan {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nav-links .btn-scan:hover,
.nav-links .btn-scan.active {
    background: var(--primary);
    color: var(--bg-dark);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Container & Sections */
.container {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-light);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Grid Layouts */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-card .icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-image {
    width: calc(100% + 4rem);
    margin: -2rem -2rem 1.5rem -2rem;
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid var(--glass-border);
}

/* User Card (Community) */
.user-card {
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.social-tag {
    font-size: 0.8rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.2rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.user-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Activity Card */
.activity-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: var(--transition);
}

.activity-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.activity-info h4 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

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

.activity-stats {
    display: flex;
    gap: 1rem;
    text-align: right;
}

.activity-stat-item {
    display: flex;
    flex-direction: column;
}

.activity-stat-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.activity-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Gamifikasi */
.progress-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
    opacity: 0.4; /* Default: Locked */
    filter: grayscale(100%);
}

.badge.active {
    opacity: 1;
    filter: grayscale(0%);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.badge i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.badge.active i {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.badge span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #334155;
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    padding: 1rem;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* AI Scanner */
.scanner-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/3;
    margin: 0 auto 1.5rem;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    pointer-events: none;
    opacity: 0.5;
}

.scanner-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.scanner-controls button {
    width: auto;
    padding: 0.8rem 1.5rem;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
}

.result-box h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .section-header h1 {
        font-size: 2rem;
    }

    .scanner-controls {
        flex-direction: column;
    }

    .scanner-controls button {
        width: 100%;
    }
}