/* CSS Variables - Spotify Theme */
:root {
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-elevated: #282828;
    --bg-highlight: #333333;
    --spotify-green: #1DB954;
    --spotify-green-hover: #1ed760;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-subdued: #6a6a6a;
    --lyrics-blue: #4688F1;
    --lyrics-blue-gradient: linear-gradient(135deg, #4688F1 0%, #1e3a8a 100%);
    --error-red: #f15e5e;
    --heart-pink: #ff6b9d;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-highlight);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-subdued);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ==================== ENTRY PAGE ==================== */
.entry-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 20% 80%, rgba(29, 185, 84, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(70, 136, 241, 0.08) 0%, transparent 50%);
    padding: 20px;
}

.entry-container {
    text-align: center;
    max-width: 380px;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

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

.entry-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--heart-pink) 0%, #ff3366 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.entry-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 107, 157, 0);
    }
}

.entry-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.entry-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.date-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.date-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-family: var(--font-main);
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 2px;
    transition: var(--transition-normal);
}

.date-input::placeholder {
    color: var(--text-subdued);
    letter-spacing: 2px;
}

.date-input:focus {
    outline: none;
    border-color: var(--spotify-green);
    background: var(--bg-highlight);
}

.date-input.error {
    border-color: var(--error-red);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.date-submit {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--spotify-green);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.date-submit:hover {
    background: var(--spotify-green-hover);
    transform: scale(1.05);
}

.date-submit:active {
    transform: scale(0.95);
}

.date-submit svg {
    width: 24px;
    height: 24px;
    color: var(--bg-primary);
}

.error-message {
    color: var(--error-red);
    font-size: 0.85rem;
    min-height: 20px;
}

/* ==================== MAIN PAGE ==================== */
.main-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a3a5c 0%, var(--bg-primary) 40%);
    padding-bottom: 40px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
}

.header-back,
.header-menu {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.header-back:hover,
.header-menu:hover {
    background: rgba(0, 0, 0, 0.6);
}

.header-back svg,
.header-menu svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.header-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== PLAYER SECTION ==================== */
.player-section {
    padding: 0 24px 40px;
}

.album-art-container {
    position: relative;
    max-width: 320px;
    margin: 0 auto 24px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.album-art {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.song-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.song-details {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.like-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.like-btn svg {
    width: 24px;
    height: 24px;
    color: var(--spotify-green);
    transition: var(--transition-fast);
}

.like-btn:hover svg {
    transform: scale(1.1);
}

.like-btn.active svg {
    color: var(--spotify-green);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 16px;
}

.progress-bar {
    height: 4px;
    background: var(--bg-highlight);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    margin-bottom: 8px;
}

.progress-bar:hover {
    height: 6px;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress {
    height: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-bar:hover .progress {
    background: var(--spotify-green);
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.control-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.control-btn.secondary svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.control-btn:hover svg {
    color: var(--text-primary);
    transform: scale(1.1);
}

.control-btn.active svg {
    color: var(--spotify-green);
}

.play-btn {
    width: 64px;
    height: 64px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.play-btn:hover {
    transform: scale(1.06);
    background: var(--text-primary);
}

.play-btn svg {
    width: 28px;
    height: 28px;
    color: var(--bg-primary);
}

/* ==================== SOBRE NÓS SECTION ==================== */
.sobre-nos-section {
    padding: 0 16px 32px;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.sobre-nos-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.sobre-nos-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.sobre-nos-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sobre-nos-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent 30%, var(--bg-secondary) 100%);
}

.sobre-nos-info {
    padding: 0 20px;
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.couple-names {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.juntos-desde {
    color: var(--spotify-green);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 20px 20px;
}

.counter-item {
    background: var(--bg-elevated);
    border-radius: var(--border-radius);
    padding: 16px 8px;
    text-align: center;
}

.counter-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.counter-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== MENSAGEM ESPECIAL ==================== */
.mensagem-section {
    padding: 0 16px 32px;
}

.mensagem-card {
    background: var(--lyrics-blue-gradient);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.mensagem-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.mensagem-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.mensagem-content {
    position: relative;
    margin-bottom: 20px;
    transition: var(--transition-normal);
}

.mensagem-content.blurred {
    filter: blur(8px);
    user-select: none;
}

.mensagem-text {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
}

.reveal-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    backdrop-filter: blur(4px);
}

.reveal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.reveal-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ==================== NOSSAS FOTOS ==================== */
.fotos-section {
    padding: 0 16px 32px;
}

.fotos-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.fotos-card:hover {
    background: var(--bg-elevated);
    transform: scale(1.01);
}

.fotos-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fotos-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.fotos-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.foto-preview-item {
    aspect-ratio: 1;
    background: var(--bg-highlight);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.foto-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-preview-item.more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.foto-preview-item.more span {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* ==================== STORIES GALLERY ==================== */
.stories-gallery {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.stories-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.stories-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.stories-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.stories-progress-bar .fill {
    height: 100%;
    background: var(--text-primary);
    width: 0%;
    transition: width 0.1s linear;
}

.stories-progress-bar.active .fill {
    width: 100%;
}

.stories-progress-bar.completed .fill {
    width: 100%;
}

.stories-close {
    position: absolute;
    top: 40px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-close svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.stories-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stories-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stories-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: var(--transition-fast);
}

.stories-nav:hover {
    opacity: 1;
}

.stories-nav svg {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.stories-prev {
    left: 0;
    justify-content: flex-start;
}

.stories-next {
    right: 0;
    justify-content: flex-end;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-subdued);
    font-size: 0.8rem;
}

/* ==================== RESPONSIVE ==================== */
/* Small mobile screens */
@media (max-width: 380px) {
    .entry-container {
        padding: 0 12px;
    }

    .entry-title {
        font-size: 1.5rem;
    }

    .entry-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .entry-icon svg {
        width: 32px;
        height: 32px;
    }

    .date-input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .date-submit {
        width: 48px;
        height: 48px;
    }

    .date-submit svg {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 480px) {
    .entry-title {
        font-size: 2rem;
    }

    .album-art-container {
        max-width: 380px;
    }

    .counter-grid {
        gap: 12px;
    }

    .counter-value {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .main-page {
        max-width: 500px;
        margin: 0 auto;
    }

    .entry-container {
        max-width: 420px;
    }

    .controls {
        gap: 32px;
    }

    .play-btn {
        width: 72px;
        height: 72px;
    }

    .play-btn svg {
        width: 32px;
        height: 32px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .progress-bar {
        height: 6px;
    }

    .progress-handle {
        opacity: 1;
    }

    .stories-nav {
        opacity: 0.5;
    }
}
