* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.search-container {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

/* Loading State */
.loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding-bottom: 200px;
}

.audio-button {
    background-color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 100px;
    display: flex;
}

.audio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.audio-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: #f8f9fa;
}

.audio-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    background-color: #e9ecef;
}

.audio-button.playing {
    border: 2px solid #4CAF50;
    background-color: #f1f8e9;
}

.audio-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #2c3e50;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.audio-button:hover .audio-title {
    color: #1a252f;
}

.audio-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: auto;
    background: #f5f5f5;
    width: fit-content;
    padding: 6px;
    border-radius: 6px;
}

.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(255 255 255);
    padding: 1rem;
    color: white;
    transition: transform 0.3s ease-in-out;
    z-index: 99;
}

.player-container.hidden {
    transform: translateY(100%);
}

.player-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.close-button {
    position: absolute;
    top: -10px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #ff4444;
}

.player-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.text-content {
    flex: 1;
    margin-right: 1rem;
}

#audioPlayer {
    width: 300px;
    height: 40px;
    flex-shrink: 0;
}

.transcript {
    font-size: 0.9rem;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    background-color: #f3f3f3;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.date {
    font-size: 0.8rem;
    color: #666;
    background: #f5f5f5;
    width: fit-content;
    padding: 6px;
    border-radius: 6px;
}

/* Estilizar la barra de scroll */
.player-content::-webkit-scrollbar {
    width: 6px;
}

.player-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.player-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.player-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Media Queries para tablets y desktop */
@media (min-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding-bottom: 180px;
    }

    .player-container {
        max-height: 50vh;
    }

    .transcript {
        font-size: 1rem;
        line-height: 1.5;
    }

    .audio-button {
        min-height: 120px;
    }

    .audio-title {
        font-size: 1rem;
    }
}

/* Estilos personalizados que complementan a daisyUI */

/* Asegurar que el contenido principal no se solape con el reproductor fijo */
main {
    padding-bottom: 200px;
}

/* Ajustes para el reproductor de audio */
audio::-webkit-media-controls-panel {
    @apply bg-base-100;
}

/* Asegurar que el contenedor de transcripción tenga un tamaño máximo y scroll */
#transcriptionContainer {
    max-height: 100px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        padding-bottom: 250px;
    }

    .audio-button {
        @apply py-3;
    }

    #playerContainer {
        @apply p-3;
    }

    #playerContainer audio {
        @apply w-full mt-3;
    }

    #playerContainer .flex {
        @apply flex-col;
    }

    .player-content {
        flex-direction: column;
    }

    .player-info {
        flex-direction: column;
    }

    #audioPlayer {
        width: 100%;
        margin-top: 1rem;
    }

    .text-content {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
    }
} 