/* Variáveis de cores pastéis */
:root {
    --primary-color: #d4bcb4;
    --secondary-color: #a8d8ea;
    --accent-color: #ffb6c1;
    --background-color: #f8f6f0;
    --text-color: #5a5a5a;
    --card-bg: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
}

[data-theme="dark"] {
    --background-color: #2a2a3c;
    --text-color: #e6e6e6;
    --card-bg: #3a3a4c;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #e6f3ff 100%);
    color: var(--text-color);
    min-height: 100vh;
    transition: background 0.3s ease;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Telas */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Tela de boas-vindas */
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.moon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700, #fff8e1);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

.star:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20px;
    left: 30px;
    animation-delay: 0s;
}

.star:nth-child(2) {
    width: 3px;
    height: 3px;
    top: 40px;
    right: 20px;
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    width: 2px;
    height: 2px;
    bottom: 30px;
    left: 50px;
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 188, 180, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-icon:hover {
    background: rgba(212, 188, 180, 0.1);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.app-header h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--primary-color);
}

.btn-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* Grid de menu */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.menu-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid rgba(212, 188, 180, 0.2);
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.menu-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.menu-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* Lista de conteúdo */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audio-item {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid rgba(212, 188, 180, 0.1);
}

.audio-item:hover {
    transform: translateX(5px);
    background: rgba(212, 188, 180, 0.1);
}

.item-icon {
    font-size: 2rem;
    margin-right: 20px;
    width: 50px;
    text-align: center;
}

.item-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.item-info p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* Player */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.player-container.visible {
    transform: translateY(0);
}

.player-content {
    position: relative;
}

.track-info {
    text-align: center;
    margin-bottom: 20px;
}

.track-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(212, 188, 180, 0.2);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    transition: width 0.1s ease;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.btn-play {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.volume-control input {
    flex: 1;
    height: 4px;
    background: rgba(212, 188, 180, 0.2);
    border-radius: 2px;
    outline: none;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-timer {
    background: rgba(212, 188, 180, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-timer:hover {
    background: var(--primary-color);
    color: white;
}

.btn-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--card-bg);
    border: 1px solid rgba(212, 188, 180, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
}

/* Configurações */
.settings-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    padding: 20px;
}

.settings-panel.visible {
    right: 0;
}

.settings-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(212, 188, 180, 0.05);
    border-radius: var(--border-radius);
}

.setting-item label {
    font-size: 1rem;
}

.setting-item input[type="range"] {
    width: 100px;
    height: 4px;
    background: rgba(212, 188, 180, 0.2);
    border-radius: 2px;
    outline: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Responsividade */
@media (max-width: 480px) {
    .app-container {
        padding: 10px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .logo {
        width: 100px;
        height: 100px;
    }
    
    .moon {
        width: 60px;
        height: 60px;
    }
}

/* Utilitários */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}