/* Estilo para el body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    /* Fondo sólido usando uno de los colores de la paleta */
    background: #1c1c1c;
    background-attachment: fixed;
    color: white;
    max-width: 100vw;
    overflow-x: auto;
}

/* Contenedor principal */
.main-content {
    flex: 1;
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Estilo para la cabecera */
.header {
    height: auto; 
    min-height: 80px;
    text-align: center;
    margin-bottom: 30px;
    background: #1c1c1c;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #383838;
    width: 90%;
    max-width: 1200px;
    box-sizing: border-box;
}

.header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-wrap: break-word;
}

/* Estilo para el bloque de carga de PDF */
.pdf-upload-block {
    background: #383838;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    max-width: 800px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid #535353;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.pdf-upload-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Títulos dentro del bloque */
.pdf-upload-block h2 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

/* Contenedor para los botones */
.pdf-upload-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Estilos para el botón de carga */
.upload-label {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none;
}

.upload-label:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Estilo para el botón de enviar */
.send-button {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    border: none;
}

.send-button:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.send-button:disabled {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(149, 165, 166, 0.2);
}

/* Estilos para el contenedor de opciones */
.options-container {
    text-align: center;
    margin-bottom: 30px;
    background: #535353;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid #6f6f6f;
    transition: transform 0.3s ease;
}

.options-container:hover {
    transform: translateY(-3px);
}

.options-container label,
.options-container select,
.options-container button,
.color-picker-container,
.teacher-display {
    color: white;
    margin-bottom: 15px;
    margin-right: 10px;
    font-weight: 500;
    font-size: 17px;
}

select, button, .teacher-display {
    padding: 12px 15px;
    min-width: 160px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
    font-weight: 500;
}

select {
    background: #1c1c1c;
    color: white;
    border: 2px solid #383838;
}

select:focus {
    outline: none;
    border-color: #6f6f6f;
    box-shadow: 0 0 0 3px rgba(111, 111, 111, 0.3);
}

.teacher-display {
    background: #1c1c1c;
    color: white;
    border: 2px solid #383838;
    text-align: center;
    box-sizing: border-box;
}

button {
    cursor: pointer;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

button:disabled {
    background: linear-gradient(45deg, #bdc3c7, #95a5a6);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(189, 195, 199, 0.2);
}

.color-picker-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.color-picker-btn {
    width: 40px;
    height: 30px;
    border: none;
    cursor: pointer;
    margin-right: 5px;
}

#color-picker-label {
    margin: 0;
    font-size: 14px;
}

/* Contenedor de la tabla */
.wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

.container {
    background: #383838;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid #535353;
    width: 100%;
    box-sizing: border-box;
}

#schedule-table {
    color: #2c3e50;
    background: white;
    width: 100%;
    max-width: none;
    min-width: auto;
    table-layout: fixed;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    margin: 0;
}

#schedule-table th, #schedule-table td {
    border: 1px solid #e0e6ed;
    padding: 15px;
    text-align: center;
    word-wrap: break-word;
    font-weight: 500;
}

#schedule-table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.schedule-cell {
    cursor: pointer;
    background-color: #f8f9fa;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px;
}

.schedule-cell:hover {
    background-color: #e3f2fd !important;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.schedule-cell:empty {
    background-color: #f8f9fa;
}

.schedule-cell:not(.filled) {
    background-color: #f8f9fa;
}

.schedule-cell.filled {
    background-color: var(--cell-color, #f8f9fa);
}

.schedule-cell .delete-button {
    all: unset;
    width: 16px;
    height: 80%;
    font-size: 10px;
    display: none;
    position: absolute;
    top: 7px;
    left: 3px;
    background-color: #FF6347;
    color: white;
    border-radius: 0%;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.schedule-cell:hover .delete-button {
    display: block;
    background-color: #FF4500;
    transform: scale(1.2);
}

.schedule-cell .delete-button:active {
    background-color: #FF3333;
    transform: scale(0.9);
}

.schedule-cell .delete-button:hover {
    background-color: #FF5733;
}

.schedule-cell {
    position: relative;
    padding: 0;
    margin: 0;
    text-align: center;
    height: 100%;
}

.schedule-cell .delete-button {
    z-index: 10;
}

.color-picker-btn {
    appearance: none;
    border: none;
    width: 60px;
    height: 24px;
    cursor: pointer;
}

.color-picker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

#total-credits {
    position: absolute;
    top: 30px;
    font-size: 24px;
    left: 20px;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    background: #383838;
    padding: 15px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid #535353;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

footer {
    background: #383838;
    color: white;
    padding: 40px 20px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    font-size: 18px;
    margin-top: auto;
    position: relative;
    bottom: 0;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin: 0 15px;
    font-size: 18px;
}

.contact-block {
    text-align: left;
    line-height: 1.6;
}

.contact-block a {
    display: inline-block;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.contact-block a:first-of-type {
    margin-left: 0;
}

.social-links {
    margin-top: 8px;
}

.github-link {
    color: #87CEEB;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.github-link:before {
    content: " ";
    margin-right: 4px;
    font-size: 1.1em;
}

.github-link:hover {
    text-decoration: underline;
    transform: translateY(-1px);
    color: #B0E0E6;
}

.contact-link {
    color: #87CEEB;
    text-decoration: none;
    font-weight: bold;
}

.contact-link:hover {
    text-decoration: underline;
}

.social-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    vertical-align: middle;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.2);
}

footer a {
    color: #87CEEB;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .header {
        width: 95%;
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .pdf-upload-block {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px;
        width: 95%;
        max-width: 95%;
    }
    
    .pdf-upload-block h2 {
        width: 100%;
        margin-bottom: 15px;
        font-size: 18px;
    }
    
    .upload-label, .send-button {
        text-align: center;
        padding: 15px 20px;
        margin-bottom: 10px;
        min-width: auto;
        flex: 0 1 auto;
    }
    
    #total-credits {
        position: relative;
        top: auto;
        left: auto;
        font-size: 18px;
        padding: 10px 15px;
        margin-bottom: 10px;
        width: auto;
        text-align: center;
    }
    
    .options-container {
        flex-direction: column;
        align-items: flex-start;
        width: 95%;
        padding: 20px;
    }
    
    .options-container label,
    .options-container select,
    .options-container button,
    .color-picker-container,
    .teacher-display {
        margin-bottom: 20px;
        margin-right: 0;
    }

    select, button, .teacher-display {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        min-width: auto;
    }
    
    .wrapper {
        width: 95%;
        margin: 15px auto;
    }
    
    .container {
        padding: 15px;
        width: 100%;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    footer p {
        font-size: 16px;
    }

    #schedule-table th, #schedule-table td {
        padding: 5px;
        font-size: 12px;
    }

    #schedule-table {
        min-width: 100%;
        width: 100%;
        font-size: 11px;
    }

    body {
        padding: 5px;
    }

    footer {
        padding: 20px 10px;
        font-size: 16px;
    }

    .main-content {
        padding: 5px;
    }

    .program-upload-btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        width: 98%;
        padding: 10px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .pdf-upload-block {
        width: 98%;
        max-width: 98%;
        padding: 15px;
        gap: 12px;
    }
    
    .pdf-upload-block h2 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    .upload-label, .send-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .wrapper {
        width: 98%;
        margin: 10px auto;
    }
    
    .container {
        padding: 10px;
    }
    
    .options-container {
        width: 98%;
        padding: 15px;
    }
    
    select, button, .teacher-display {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    #total-credits {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    body {
        padding: 5px;
    }
}

@media (min-width: 1400px) {
    .wrapper {
        max-width: 1600px;
    }
    
    body {
        padding: 0;
    }
    
    .main-content {
        padding: 20px;
    }
}
