@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(45deg, #990000, #c92a2a);
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --card-radius: 12px;
    --transition-speed: 0.3s;
    --primary-color: #990000;
    --secondary-color: #c92a2a;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}



#page_title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

#page_title h5 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#page_title p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 300;
}

/* Grid de tareas */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Tarjeta de tarea */
.task-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-gradient);
}

.task-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.task-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #4e54c8;
    transition: transform 0.4s ease;
}

.task-card:hover .task-icon {
    transform: scale(1.1);
}

.task-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.task-link {
    font-size: 0.9rem;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
    margin-bottom: 1rem;
}

.open-link-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    border: none;
    margin-top: auto;
}

.open-link-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.open-link-btn i {
    margin-right: 0.3rem;
}

/* Botón de agregar tarea */
.add-task-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 5px 15px rgba(153, 0, 0, 0.3);
}

.add-task-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(153, 0, 0, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    margin: 50px auto;
    border-radius: var(--card-radius);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    position: relative;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-btn:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus {
    outline: none;
    border-color: #4e54c8;
}

/* Selector de iconos */
.icon-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selected-icon {
    width: 60px;
    height: 60px;
    background: #f5f7fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #4e54c8;
    margin-bottom: 0.5rem;
    border: 2px solid #eaeef2;
}

.icon-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
}

.icon-options i {
    width: 40px;
    height: 40px;
    background: #f5f7fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.icon-options i:hover {
    background: #eaeef2;
    color: #4e54c8;
    transform: scale(1.1);
}

.icon-options i.selected {
    background: #4e54c8;
    color: white;
}

/* Selector de colores */
.color-selector {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-speed);
    position: relative;
}

.color-option:hover {
    transform: scale(1.15);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Selector de destino */
.destination-selector {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.destination-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.destination-option input[type="radio"] {
    accent-color: var(--primary-color);
}

.destination-option label {
    font-weight: normal;
    cursor: pointer;
}

/* Botones de acción */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.save-btn, .delete-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.save-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    flex: 1;
}

.save-btn:hover {
    box-shadow: 0 5px 15px rgba(153, 0, 0, 0.3);
}

.delete-btn {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.task-card {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .task-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .icon-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    .task-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .icon-options {
        grid-template-columns: repeat(3, 1fr);
    }
}