/*
 * Paleta de colores: Supermercados TATA Uruguay
 * Rojo TATA: #E31E24
 * Amarillo TATA: #FDB913
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #E31E24;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Auth Screen */
.auth-screen {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    background: #E31E24;
    z-index: 1000;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.auth-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-container form {
    width: 100%;
}

.auth-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.auth-container input:focus {
    outline: none;
    border-color: #E31E24;
}

.auth-container button {
    width: 100%;
    padding: 15px;
    background: #E31E24;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
}

/* Main App */
.app {
    width: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo {
    display: block;
    margin: 0 auto 40px auto;
    max-width: 240px;
    width: 100%;
    height: auto;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #E31E24;
}

.controls {
    display: flex;
    justify-content: center;
}

button {
    padding: 15px 40px;
    background: #E31E24;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E31E24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: #666;
    font-size: 16px;
}

/* Result */
.result {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

audio {
    width: 100%;
    max-width: 500px;
}

#download-btn {
    background: #E31E24;
}

/* Error */
.error {
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 12px;
    color: #c33;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 36px;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
}
