:root {
    --primary: #3b82f6;
    --success: #10b981;
    --bg: #f8fafc;
    --text: #1e293b;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden; /* Evitar scroll en el body principal */
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: var(--bg);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Pantalla de Inicio */
#home-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 50px; /* Reducido un poco para que quepan dos líneas en el móvil */
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-top: -10px;
}

.spacer {
    height: 100px;
}

.btn-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    font-size: 30px;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-circle:active {
    transform: scale(0.9);
}

/* Header */
header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-top: env(safe-area-inset-top);
}

header h2 {
    font-family: 'Poppins', sans-serif;
    flex: 1;
    text-align: center;
    margin-right: 40px; /* Balancear con el botón back */
}

.btn-back {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    padding: 10px;
}

/* Contenedores Glass */
.glass-container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 1rem;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-primary:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Grid de Fotos */
.photo-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    overflow-y: auto;
    padding: 5px;
    margin-bottom: 80px;
}

.photo-item {
    aspect-ratio: 4/3;
    background-color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.status-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.status-uploaded { color: var(--success); }
.status-error { color: #ef4444; }

/* Actions Float */
.actions {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.btn-action {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.btn-blue { background-color: var(--primary); }
.btn-green { background-color: var(--success); }
.btn-action.disabled { background-color: #94a3b8; cursor: not-allowed; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    width: 85%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.success-icon {
    font-size: 60px;
    color: var(--success);
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
