:root {
    --primary-bg: #fdfdfd;
    --main-accent: #5f6445;
    --text-color: #2c2c2c;
    --secondary-text: #666;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@font-face {
    font-family: 'MileaDilan';
    src: url('https://assets.dilanitb1997.cdn.klikfilm.com/fonts/mileadilan.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    background-image:
        radial-gradient(circle at 2px 2px, #f0f0f0 1px, transparent 0);
    background-size: 24px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    flex-grow: 1;
    padding: 20px 0 80px 0;
}

@media (max-width: 768px) {
    .main-wrapper {
        width: 100%;
        padding: 15px 15px 100px 15px;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

header {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Modals extra missing */
.vintage-title {
    font-family: 'MileaDilan', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    letter-spacing: 1px;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .vintage-title {
        font-size: 2.5rem;
    }
}

.vintage-desc {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--secondary-text);
    font-style: italic;
}

.logout-confirm-content {
    text-align: center;
    max-width: 400px;
}

.logout-confirm-content h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.logout-confirm-content p {
    color: var(--secondary-text);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.logout-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancel {
    padding: 10px 24px;
    background: #f1f1f1;
    color: #666;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: #e5e5e5;
}

.btn-confirm {
    padding: 10px 24px;
    background: var(--main-accent);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-confirm:hover {
    background: #4e5339;
}

/* Login Modal - Vertical Refresh */
.login-modal-grid {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    max-width: 480px;
    width: 90%;
    margin: auto;
    border: none;
    border-radius: 24px;
}

.login-left {
    background: linear-gradient(135deg, #1e1e1e, #3a3a4c);
    color: white;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    border-radius: 10px;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(95, 100, 69, 0.1), transparent);
    pointer-events: none;
}

.login-left .vintage-title {
    font-family: 'MileaDilan', serif;
    font-size: 3rem;
    margin-bottom: 12px;
    color: white;
}

.login-left .vintage-desc {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    max-width: 300px;
}

.login-right {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    text-align: center;
}

.login-right h3 {
    font-size: 2rem;
    font-family: 'MileaDilan', serif;
    margin-bottom: 8px;
    color: var(--text-color);
}

.login-right p {
    font-size: 0.95rem;
    color: var(--secondary-text);
    margin-bottom: 30px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #3c4043;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-btn span {
    white-space: nowrap;
    /* Prevent text wrapping inside the button */
}

.google-btn:hover {
    background: #fcfcfc;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.google-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Modal System - Centered Fix */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    background-image: url('https://assets.dilanitb1997.cdn.klikfilm.com/images/background/bg_soft.png') !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    padding: 0px; /* Reset padding to allow full-width header if needed */
    max-width: 580px;
    width: 100%;
    position: relative;
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    margin: auto;
    overflow: hidden; /* Ensure content doesn't bleed out of border-radius */
}

.modal-content.padding20 {
    padding: 20px !important;
}

/* Player Modal Header Styles */
.player-header {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.player-header .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #4d6d62ed;
    z-index: 1;
}

.player-header .player-artwork {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    width: 180px;
    height: 180px;
    border: 5px solid white;
    border-radius: 20px;
}

.player-info-section {
    padding: 0 30px;
    text-align: center;
}

.player-modal-content .modal-close {
    z-index: 10;
    color: white;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 30px 20px;
        border-radius: 20px;
    }
}

.modal-content.scale-up {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    font-size: 1.5rem;
    color: var(--secondary-text);
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}

/* Nav Styles */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo-img {
    width: 183px;
    height: 55px;
    display: block;
    object-fit: contain;
}


.btn-masuk {
    padding: 10px 24px;
    background: var(--main-accent);
    color: white;
    font-weight: 600;
    border-radius: 25px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(95, 100, 69, 0.2);
}

.btn-masuk:hover {
    background: #4e5339;
    transform: translateY(-2px);
}

.user-profile-actions {
    position: relative;
}

.profile-btn {
    background: none;
    color: var(--secondary-text);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.profile-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--main-accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: -10px;
    top: calc(100% + 15px);
    background: white;
    min-width: 220px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 12px 0;
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: dropSlideIn 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Caret Arrow */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

@keyframes dropSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--main-accent);
    padding-left: 25px;
}

.dropdown-menu .divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 8px 0;
}

/* Mobile Bottom Nav removed */
/* Notification Alert */
#alert-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 999999;
}

.alert {
    min-width: 250px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    background: var(--text-color);
    margin-bottom: 10px;
    transform: translateX(30px);
    opacity: 0;
    transition: 0.4s;
}

.alert.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-success {
    background: #00b894;
}

.alert-error {
    background: #d63031;
}

/* Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.page-title {
    font-family: 'MileaDilan', serif;
    font-size: 3.5rem;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .page-header {
        padding: 20px 0;
        margin-bottom: 20px;
    }
}

.page-subtitle {
    color: var(--secondary-text);
}

/* TTS Specific Styles */
.tts-container {
    padding: 20px 0;
}

.tts-header {
    text-align: center;
    margin-bottom: 40px;
}

.tts-game-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: flex-start;
}

.tts-grid-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.tts-grid {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: max-content;
    margin: 0 auto;
}

.tts-grid.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1) blur(4px);
    transform: scale(0.98);
}

.tts-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.tts-grid-wrapper.playing .tts-play-overlay {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    visibility: hidden;
}

.tts-cell {
    width: 45px;
    height: 45px;
    position: relative;
}

.tts-cell input {
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid #ddd;
    outline: none;
    text-transform: uppercase;
    background: white;
    transition: all 0.3s;
}

.tts-cell input:focus {
    border-color: var(--main-accent);
    box-shadow: 0 0 10px rgba(95, 100, 69, 0.2);
    z-index: 2;
}

.tts-cell.active-word-cell input {
    background: rgba(95, 100, 69, 0.1);
    border-color: var(--main-accent);
}

.tts-cell.correct input {
    border-color: #00ff88;
    background: #f0fff8;
    color: #008844;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    pointer-events: none;
}

.tts-cell.error input {
    border-color: #ff3333;
    background: #fff0f0;
    color: #cc0000;
    box-shadow: inset 0 0 5px rgba(255, 51, 51, 0.2);
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    color: #888;
    z-index: 1;
    pointer-events: none;
}

.tts-hints h3 {
    font-family: 'MileaDilan', serif;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--main-accent);
    padding-bottom: 5px;
    font-size: 1.8rem;
}

.hint-section {
    margin-bottom: 30px;
}

.hint-section ul {
    list-style: none;
    padding: 0;
}

.hint-section li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--secondary-text);
    padding-left: 20px;
    position: relative;
}

.hint-section li::before {
    content: attr(data-num);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--main-accent);
}

.hint-section li.solved {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Foto Bareng Specific Styles */
.foto-bareng-container {
    padding: 20px 0;
}

.fb-header {
    text-align: center;
    margin-bottom: 40px;
}

.fb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .fb-grid {
        gap: 20px;
    }
}

.upload-card,
.status-card,
.result-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.fb-col-left {
    transition: all 0.5s ease;
}

.fb-col-left.is-processing {
    pointer-events: none;
    opacity: 0.6;
    filter: grayscale(0.5) blur(1px);
    cursor: not-allowed;
}

.drop-zone {
    width: 100%;
    height: 300px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--main-accent);
    background: rgba(95, 100, 69, 0.02);
}

.dz-content {
    text-align: center;
    color: var(--secondary-text);
}

.dz-content svg {
    margin-bottom: 15px;
    color: #bbb;
}

.preview-img,
.result-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 5;
    display: none;
    top: 0;
    left: 0;
}

.status-card {
    margin-bottom: 20px;
}

.status-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.status-indicator {
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.status-indicator.idle {
    background: #f5f5f5;
    color: #999;
}

.status-indicator.processing {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
    animation: status-pulse 1.5s infinite ease-in-out;
}

@keyframes status-pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

.result-box {
    width: 100%;
    height: 250px;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.empty-result {
    text-align: center;
    color: #ccc;
}

.empty-result svg.spinning {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(359deg);
    }
}

.frame-section {
    margin-bottom: 25px;
}

.frame-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 50px);
    justify-content: start;
    gap: 12px;
}

.frame-item {
    width: 50px;
    height: 50px;
    background: var(--main-accent);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.frame-item:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(95, 100, 69, 0.4);
}

.frame-item.active {
    border-color: #2c2c2c;
}

.fb-actions,
.upload-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action span {
    margin-left: 8px;
}

.btn-primary {
    background: var(--main-accent);
    color: white;
}

.btn-secondary {
    background: #2c2c2c;
    color: white;
}

.btn-outline {
    border: 1px solid #ddd;
    background: #f0f0f0;
    color: var(--text-color);
}

/* Camera Modal */
.camera-content {
    max-width: 600px;
    padding: 30px;
    text-align: center;
}

.video-container {
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    aspect-ratio: 4/3;
    position: relative;
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 20px solid rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Explore Grid Menu */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 600px) {
    .explore-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 0 20px 20px 20px;
        margin-left: -20px;
        margin-right: -20px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .explore-grid::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .explore-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        margin-bottom: 0;
        /* Clear previous margin if any */
    }
}

.explore-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.explore-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: var(--main-accent);
}

.explore-card .icon-box {
    width: 60px;
    height: 60px;
    background: rgba(95, 100, 69, 0.08);
    color: var(--main-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-bottom: 5px;
}

.explore-card h3 {
    font-family: 'MileaDilan', serif;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* TTS Stats Grid */
.tts-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .tts-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .tts-stat-box {
        padding: 10px 5px;
    }
    .tts-stat-box .stat-label {
        font-size: 0.65rem;
        margin-bottom: 5px;
        letter-spacing: 0;
    }
    .tts-stat-box .stat-value {
        font-size: 1.1rem;
    }
}

.tts-stat-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tts-stat-box .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tts-stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
}

/* Explore Enhanced Visuals */
.explore-parallax-bg {
    position: fixed;
    opacity: 0.15;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://assets.dilanitb1997.cdn.klikfilm.com/images/explorebg.png') no-repeat center center;
    background-size: cover;
    z-index: -2;
    transition: transform 0.1s ease-out;
    /* Smooth transition for zoom */
    pointer-events: none;
}

.explore-floating-dilan {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    z-index: -1;
    pointer-events: none;
    transition: transform 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out;
}

.explore-floating-dilan img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.relative-content {
    position: relative;
    z-index: 1;
}

/* Dari Dilan Section */
.dari-dilan-section {
    margin-top: 80px;
    padding-bottom: 50px;
}

.section-title {
    font-family: 'MileaDilan', serif;
    font-size: 2.8rem;
    margin-bottom: 30px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--main-accent);
}

.dilan-music-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .dilan-music-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

.music-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 150px;
}

.music-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: var(--main-accent);
}

.card-cover {
    width: 150px;
    height: 150px;
    background: #f0f0f0;
    position: relative;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.card-tag {
    font-size: 0.75rem;
    color: var(--main-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.btn-mini-play {
    width: 40px;
    height: 40px;
    background: var(--main-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(95, 100, 69, 0.2);
    flex-shrink: 0;
}

/* Audio Player Modal */
.player-modal-content {
    max-width: 450px;
    text-align: center;
}

.player-artwork {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    margin: 0 auto 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.player-artist {
    color: var(--secondary-text);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Waves Visualization */
.wave-container {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 30px;
}

.wave-bar {
    width: 3px;
    height: 15px;
    background: var(--main-accent);
    border-radius: 3px;
    transition: height 0.2s ease;
}

.wave-container.playing .wave-bar {
    animation: waveMotion 0.8s ease-in-out infinite alternate;
}

@keyframes waveMotion {
    0% {
        height: 5px;
    }

    100% {
        height: 35px;
    }
}

/* Add delays to bars for wave effect */
.wave-bar:nth-child(2n) {
    animation-delay: 0.2s;
}

.wave-bar:nth-child(3n) {
    animation-delay: 0.4s;
}

.wave-bar:nth-child(4n) {
    animation-delay: 0.1s;
}

/* Control Bar */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.ctrl-btn {
    background: none;
    color: var(--text-color);
    transition: var(--transition);
}

.ctrl-btn:hover {
    color: var(--main-accent);
}

.play-pause-btn {
    width: 60px;
    height: 60px;
    background: var(--main-accent);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(95, 100, 69, 0.15);
}

.play-pause-btn:hover {
    transform: scale(1.05);
}

/* Seekbar */
.seek-container {
    width: 100%;
    margin-bottom: 10px;
}

input[type=range].seekbar {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: #abc1b9;
    border-radius: 5px;
    outline: none;
}

input[type=range].seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--main-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--secondary-text);
}

/* Media Queries */
@media (max-width: 900px) {
    .tts-game-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-middle {
        display: none;
    }

    .nav-container {
        justify-content: center;
        position: relative;
    }

    .nav-right {
        position: absolute;
        right: 15px;
    }

    .main-wrapper {
        padding-bottom: 40px;
    }

    .tts-cell {
        width: 40px;
        height: 40px;
    }

    .explore-parallax-bg {
        display: none;
    }

    .explore-floating-dilan {
        width: 180px !important;
        height: 180px !important;
        opacity: 0.5;
        bottom: 80px;
        left: -40px;
    }
}

@media (max-width: 600px) {
    .login-modal-grid {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }
}

@media (max-width: 600px) {

    .fb-actions,
    .upload-actions {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }

    .player-artwork {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .vintage-title {
        font-size: 2.2rem !important;
    }

    .page-title {
        font-size: 2.2rem !important;
    }

    .tts-cell {
        width: 38px !important;
        height: 38px !important;
    }
}

.ratio-item {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.ratio-item.active {
    border-color: var(--main-accent) !important;
    color: var(--main-accent) !important;
    background: rgba(95, 100, 69, 0.05) !important;
}

/* KTM Modal Styles - STIKI Inspired Professional Look */
.ktm-modal-content {
    max-width: 600px !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.ktm-card {
    width: 100%;
    aspect-ratio: 1.6 / 1;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
}

/* Background Curve based on design - Updated to Gray */
.ktm-card::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -18%;
    width: 55%;
    height: 120%;
    background: #64748b;
    /* Cool Gray Slate */
    border-radius: 0 100% 100% 0;
    z-index: 1;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.05);
}

.ktm-close-btn {
    top: -45px !important;
    right: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px);
    padding: 8px 16px !important;
    border-radius: 30px !important;
    color: white !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease;
}

.ktm-close-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
}

.ktm-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
}

.ktm-left-section {
    width: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 35px;
    color: white;
}

.ktm-university-logo {
    width: 65px;
    height: 65px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    object-fit: contain;
}

.ktm-web-url {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
    text-transform: lowercase;
}

.ktm-validity {
    position: absolute;
    bottom: 35px;
    left: 40px;
    color: #1e3a8a;
    z-index: 3;
}

.ktm-validity-label {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.ktm-validity-date {
    font-size: 0.9rem;
    font-weight: 800;
}

.ktm-main-section {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.ktm-header-text {
    text-align: right;
    margin-bottom: 25px;
}

.ktm-header-text span {
    font-size: 0.55rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
}

.ktm-header-text h3 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #1e3a8a;
    /* Theme Blue */
    margin: 0;
}

.ktm-data-container {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 20px;
    flex: 1;
}

.ktm-student-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: right;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-row label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.detail-row span {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.ktm-photo-box {
    width: 140px;
    height: 175px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff;
}

.ktm-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ktm-actions-outer {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 600px;
}

.ktm-disclaimer-text {
    margin-top: 25px;
    font-size: 0.85rem;
    color: #ffffff;
    /* Explicit White */
    text-align: center;
    font-style: italic;
    line-height: 1.6;
    padding: 0 20px;
    opacity: 0.9;
}

@media (max-width: 650px) {
    .ktm-card {
        aspect-ratio: auto;
        flex-direction: column;
        border-radius: 20px;
    }

    .ktm-card::before {
        width: 120%;
        height: 160px;
        border-radius: 0 0 100% 100%;
        left: -10%;
        top: -20px;
    }

    .ktm-card-inner {
        flex-direction: column;
    }

    .ktm-left-section {
        width: 100%;
        padding-top: 25px;
        height: 140px;
    }

    .ktm-validity {
        position: static;
        margin: 20px 0;
        text-align: center;
    }

    .ktm-main-section {
        padding: 30px 20px;
    }

    .ktm-header-text {
        text-align: center;
        margin-bottom: 20px;
    }

    .ktm-data-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ktm-student-details {
        text-align: center;
        order: 1;
    }

    .ktm-photo-box {
        margin: 0 auto;
        order: 0;
        width: 120px;
        height: 150px;
    }
}

@media (max-width: 650px) {
    .ktm-modal-content {
        max-width: 95% !important;
        height: 90vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fff !important;
        border-radius: 24px !important;
    }

    .ktm-close-btn {
        top: 15px !important;
        right: 15px !important;
        z-index: 100;
        background: rgba(0, 0, 0, 0.4) !important;
        padding: 6px 12px !important;
    }

    #ktm-card-render {
        flex: 1;
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
        background: #fff;
        box-shadow: none;
    }

    .ktm-card {
        display: flex;
        flex-direction: column;
        aspect-ratio: auto;
    }

    .ktm-card::before {
        width: 140%;
        height: 180px;
        left: -20%;
        top: -40px;
        border-radius: 0 0 100% 100%;
    }

    .ktm-actions-outer {
        margin-top: 0;
        padding: 20px;
        background: #ffffff;
        border-top: 1px solid #f1f5f9;
        position: sticky;
        bottom: 0;
        z-index: 50;
    }

    .ktm-disclaimer-text {
        color: #64748b !important;
        margin: 15px 0;
        font-size: 0.75rem;
        text-align: center;
    }
}

/* Ucapan dari Dilan Section */
.ucapan-dilan-section {
    margin-top: 20px;
    margin-bottom: 50px;
}

.ucapan-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9fb 100%);
    border-radius: 30px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.ucapan-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.ucapan-tag {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--main-accent);
    margin-bottom: 15px;
    display: block;
}

.ucapan-title {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ucapan-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 30px;
    max-width: 500px;
}

.ucapan-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-play-ucapan {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-play-ucapan:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background: #333;
}

.play-icon-box {
    width: 32px;
    height: 32px;
    background: var(--main-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 30px;
}

.v-bar {
    width: 3px;
    height: 10px;
    background: #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.audio-visualizer.active .v-bar {
    background: var(--main-accent);
    animation: vBarPulse 0.8s infinite alternate;
}

@keyframes vBarPulse {
    from {
        height: 5px;
    }

    to {
        height: 25px;
    }
}

.audio-visualizer.active .v-bar:nth-child(2n) {
    animation-delay: 0.2s;
}

.audio-visualizer.active .v-bar:nth-child(3n) {
    animation-delay: 0.4s;
}

.ucapan-decor {
    width: 250px;
    flex-shrink: 0;
}

.ucapan-decor img {
    width: 100%;
    filter: drop-shadow(20px 20px 40px rgba(0, 0, 0, 0.1));
}

@media (max-width: 900px) {
    .ucapan-card {
        flex-direction: column-reverse;
        text-align: center;
        padding: 30px;
        gap: 20px;
    }

    .ucapan-title {
        font-size: 2.2rem;
    }

    .ucapan-actions {
        justify-content: center;
    }

    .ucapan-decor {
        width: 180px;
    }
}

/* Profile Modal Styles */
.profile-modal-content {
    max-width: 500px !important;
}

.profile-form .input-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--main-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.profile-form input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fdfdfd;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.profile-form input:focus {
    border-color: var(--main-accent);
    background: #fff;
}

.profile-form input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.name-change-info {
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}

.profile-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-save-profile {
    flex: 2;
    background: var(--main-accent);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(95, 100, 69, 0.3);
}

/* Visibility Helpers for Responsive Layout */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

/* Ucapan Dilan Card Styles */
.ucapan-bg-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.ucapan-page-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1;
}

.ucapan-card {
    width: 100%;
    max-width: 460px;
    background: #e2e6e3;
    border-radius: 45px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.ucapan-header {
    position: relative;
    height: 295px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    text-align: center;
    color: white;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0px 0px 35px 35px;
    border-radius: 0px 0px 35px 35px;
    overflow: hidden;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #4d6d62ed;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 5px;
}

.dari-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 5px;
    opacity: 0.9;
}

.dilan-logo-img {
    height: 42px;
    filter: brightness(0) invert(1);
}

.sub-text {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
    margin-top: 0;
    letter-spacing: 0.5px;
}

.profile-container {
    position: absolute;
    bottom: -75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.profile-frame {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
    background: #eee;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ucapan-body {
    position: relative;
    padding: 0px 30px 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    width: 100%;
    box-sizing: border-box;
    z-index: 5;
}

.audio-player-container {
    width: 100%;
    height: 65px;
    background: #c3cdca;
    border-radius: 50px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
}

.btn-play-pause {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #a68e67;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    flex-shrink: 0;
}

.btn-play-pause svg {
    width: 26px;
    height: 26px;
}

.progress-bar-container {
    flex: 1;
    padding-right: 15px;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #2b463a;
    width: 0%;
    transition: width 0.1s linear;
}

.visualizer-container {
    width: 100%;
    display: flex;
    justify-content: center;
    height: 40px;
}

.share-waves {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100%;
}

.share-bar {
    width: 3px;
    height: 15px;
    background: #2b463a;
    border-radius: 4px;
    opacity: 0.6;
}

.active-waves .share-bar {
    animation: visualizerWave 0.5s ease-in-out infinite alternate;
}

@keyframes visualizerWave {
    0% { height: 10px; }
    100% { height: 35px; }
}

.share-bar:nth-child(even) { animation-delay: 0.2s; }
.share-bar:nth-child(3n) { animation-delay: 0.4s; }

.action-container {
    width: 100%;
    max-width: 460px;
}

.btn-finish {
    display: block;
    width: 100%;
    padding: 18px;
    background: #4f6d61;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(79, 109, 97, 0.2);
    transition: all 0.3s ease;
}

.btn-finish:hover {
    transform: translateY(-3px);
    background: #445e54;
    box-shadow: 0 20px 45px rgba(79, 109, 97, 0.3);
}

@media (max-width: 480px) {
    .ucapan-card {
        max-width: 90vw;
    }
    .profile-frame {
        height: 120px;
        width: 120px;
    }
    .profile-container {
        bottom: -60px;
    }
    .ucapan-header {
        height: 230px;
    }
    .ucapan-body {
        padding-top: 70px;
        padding-left: 20px;
        padding-right: 20px;
    }
}