/* 
   Sistema de Diseño Biorritmos Moderno
   Estética Premium: Glassmorphism, Dark-first, Outfit & Inter fonts.
*/

:root {
    --primary: #6366f1; /* Indigo */
    --secondary: #a855f7; /* Violet */
    --accent: #22d3ee; /* Cyan */
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h1 { font-size: 2.5rem; text-align: center; margin-bottom: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

input[type="text"], input[type="date"] {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

button {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    margin-top: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: none;
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Results Section */
.resultado-container {
    display: none;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.3);
}

th {
    background: rgba(30, 41, 59, 0.8);
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

td {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9375rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Charts and Extras */
#graficoBiorritmo {
    margin-top: 2rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 1.5rem;
    border-radius: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.info-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-item strong {
    font-size: 1.125rem;
    font-family: var(--font-heading);
}

small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Scrollbar beautifier */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
