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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    font-size: 1.5em;
}

h3 {
    color: #555;
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Sección de entrada */
.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

#dateForm {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 4px;
    font-style: italic;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn-convert {
    padding: 10px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-convert:active {
    transform: translateY(0);
}

.btn-today {
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0.8;
}

.btn-today:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    opacity: 1;
}

.btn-today:active {
    transform: translateY(0);
}

/* Sección de resultados */
.results-section {
    margin-bottom: 30px;
}

.error-message {
    display: none;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    padding: 12px;
    color: #c33;
    margin-bottom: 15px;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.results-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.results-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95em;
}

.results-table tbody tr {
    transition: background-color 0.2s;
}

.results-table tbody tr:hover {
    background-color: #f5f5f5;
}

.results-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px !important;
}

/* Sección de información */
.info-section {
    background: #f0f4ff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-section ul {
    list-style: none;
    columns: 2;
    gap: 20px;
    margin-top: 10px;
}

.info-section li {
    background: white;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    break-inside: avoid;
}

.info-section li strong {
    color: #667eea;
}

.info-section p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Tabla de información de calendarios */
.calendar-guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-guide-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-guide-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    border-bottom: 2px solid #667eea;
}

.calendar-guide-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.9em;
    color: #333;
}

.calendar-guide-table tbody tr {
    transition: background-color 0.2s;
}

.calendar-guide-table tbody tr:hover {
    background-color: #f9f9f9;
}

.calendar-guide-table tbody tr:nth-child(even) {
    background-color: #fafbff;
}

.calendar-guide-table tbody tr:last-child td {
    border-bottom: none;
}

.calendar-guide-table small {
    color: #666;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    #dateForm {
        grid-template-columns: 1fr 1fr;
    }

    .btn-convert {
        grid-column: 1 / -1;
    }

    .calendar-guide-table {
        font-size: 0.8em;
    }

    .calendar-guide-table th,
    .calendar-guide-table td {
        padding: 8px 10px;
    }

    .results-table {
        font-size: 0.85em;
    }

    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }

    .info-section ul {
        columns: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.4em;
    }

    #dateForm {
        grid-template-columns: 1fr;
    }

    .calendar-guide-table {
        font-size: 0.75em;
    }

    .calendar-guide-table th,
    .calendar-guide-table td {
        padding: 6px 8px;
    }

    .results-table {
        font-size: 0.8em;
    }
}
