/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

:root {
    --color-bg-start: #111827;       /* Dark Gray-Blue */
    --color-bg-end: #111827;         /* Dark Gray-Blue */
    --color-text: #E5E7EB;           /* Light Gray */
    --color-text-muted: #9CA3AF;     /* Medium Gray */
    --color-accent: #38BDF8;          /* Sky Blue */
    --color-accent-secondary: #F472B6; /* Pink */
    --color-accent-light: #7DD3FC;     /* Lighter Sky Blue */
    --color-card-bg: rgba(23, 32, 42, 0.45); /* fallback */
    --color-card-border: rgba(55, 65, 81, 0.7);
    --font-sans: 'Inter', sans-serif;
    --font-logo: 'Playfair Display', serif;
}

body {
    background-color: var(--color-bg-start);
    color: var(--color-text);
    font-family: var(--font-sans);
    position: relative;
    overflow-x: hidden;
}

/* Konten utama berada di atas background */
.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Custom font class for the logo text */
.font-logo {
    font-family: var(--font-logo);
}

/* Animasi Gradien untuk Teks */
.animated-gradient-text {
    background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent-secondary), var(--color-accent), var(--color-accent-light));
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 8s ease-in-out infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-accent {
    color: var(--color-accent);
}
.text-accent-light {
     color: var(--color-accent-light);
}

/* Logo Animation */
#logo-text {
    display: inline-block;
    cursor: pointer;
}

.logo-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-20px);
    animation: animateLetterIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

#logo-text:hover .logo-letter {
    transform: translateY(-5px) scale(1.1);
    color: var(--color-accent-light);
}

#logo-text:hover .logo-letter:nth-child(2) { transition-delay: 0.02s; }
#logo-text:hover .logo-letter:nth-child(3) { transition-delay: 0.04s; }
#logo-text:hover .logo-letter:nth-child(4) { transition-delay: 0.06s; }
#logo-text:hover .logo-letter:nth-child(5) { transition-delay: 0.08s; }
#logo-text:hover .logo-letter:nth-child(6) { transition-delay: 0.10s; }
#logo-text:hover .logo-letter:nth-child(7) { transition-delay: 0.12s; }

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

/* Efek Kaca (Glassmorphism) untuk Kartu */
.futuristic-card, .feature-card {
    background: rgba(30, 41, 59, 0.4); /* slate-800 with opacity */
    border: 1px solid rgba(51, 65, 85, 0.8); /* slate-700 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.futuristic-card:hover, .feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.5); /* Use accent color for hover */
    background: rgba(30, 41, 59, 0.6);
}

/* Loader animation */
.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-accent);
    animation: spin 1s infinite linear;
}

.loader-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-accent);
    animation: spin 1s infinite linear;
    margin: 0 auto;
}

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

/* Fade-in animation */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Helper class */
.hidden {
    display: none;
}

/* Initial animation states are now handled by GSAP in JS to prevent conflicts */

/* Selected state for persona buttons */
.btn-persona.selected {
    border-color: var(--color-accent);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.2);
}

.btn-persona.selected h3 {
    color: var(--color-accent);
}
.btn-persona h3, .btn-persona p {
    transition: color 0.3s ease;
}
.btn-persona:hover h3 {
    color: var(--color-accent-light);
}

/* Button styles */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg-start);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    transform: scale(1);
    border: none;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}
.btn-primary:hover:not(:disabled) {
    transform: scale(1.05);
    background: var(--color-accent-light);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.35);
}
.btn-primary:disabled {
    background: #4A5568; /* Gray */
    cursor: not-allowed;
    color: var(--color-text-muted);
    box-shadow: none;
}


.btn-primary-small {
    background: var(--color-accent);
    color: var(--color-bg-start);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
    border: none;
}

.btn-primary-small:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background-color: rgba(55, 65, 81, 0.5); /* slate-700 with opacity */
    border: 1px solid var(--color-card-border);
    color: var(--color-text-muted);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}
.btn-secondary:hover:not(:disabled) {
    background-color: rgba(71, 85, 105, 0.7);
    color: var(--color-text);
    border-color: var(--color-accent);
}
.btn-secondary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-copy {
    color: var(--color-text-muted);
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    padding: 4px;
    border-radius: 50%;
}
.btn-copy:hover {
    color: var(--color-accent);
    background-color: rgba(56, 189, 248, 0.1);
    transform: scale(1.1);
}

/* Premium Features & Animations */
.premium-tag {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.premium-tag-animated {
  animation: pulse-pro 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-pro {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(250, 204, 21, 0); }
}

@keyframes subtle-glow {
  0% { box-shadow: 0 0 15px -5px rgba(56, 189, 248, 0.3), inset 0 0 5px -2px rgba(56, 189, 248, 0.2); }
  100% { box-shadow: 0 0 25px 0px rgba(56, 189, 248, 0.5), inset 0 0 10px 0px rgba(56, 189, 248, 0.3); }
}

#analyzeButton:not(:disabled) {
  animation: subtle-glow 1.8s ease-in-out infinite alternate;
}

label[for="file-upload"]:hover .upload-icon {
    transform: scale(1.1) rotate(-3deg);
}

/* Subscription Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

.modal-content {
    position: relative;
    transform: scale(0.95);
    animation: scaleInModal 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInModal {
    to { opacity: 1; }
}

@keyframes scaleInModal {
    to { transform: scale(1); }
}

/* --- Background Video Dinamis --- */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}
.video-background-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.7);
}

/* --- Slider untuk Kartu Ide --- */
.slider-container {
    overflow: hidden;
    padding: 0 50px; /* Memberi ruang untuk tombol navigasi */
}

.slider-wrapper {
    width: 100%;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.slider-nav.left-0 { left: 0; }
.slider-nav.right-0 { right: 0; }

/* Styling untuk konten di dalam kartu */
.mood-badge {
    display: inline-block;
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--color-accent-light);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.caption-text {
    font-size: 28px;
    font-weight: 700;
    margin: 1rem 0;
    line-height: 1.2;
    min-height: 68px; /* Approx 2 lines */
    display: flex;
    align-items: center;
}
.hashtags {
    color: var(--color-accent-secondary);
    font-weight: 500;
}
.play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-bg-start);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.play-pause-btn:hover {
    transform: scale(1.1);
}
.play-pause-btn .play-icon,
.play-pause-btn .pause-icon {
    margin: auto;
}

/* Menyembunyikan pemutar video YouTube */
#youtube-player-container {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}