/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: rgba(0, 0, 0, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --accent: #6c63ff;
    --accent-hover: #5a52d5;
    --success: #00c897;
    --danger: #ff4757;
    --warning: #ffa502;
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Background Shapes === */
.background-shapes {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px; height: 300px;
    background: #6c63ff;
    top: -50px; left: -50px;
}

.shape-2 {
    width: 250px; height: 250px;
    background: #ff6b9d;
    bottom: 10%; right: -30px;
    animation-delay: -7s;
}

.shape-3 {
    width: 200px; height: 200px;
    background: #00c897;
    top: 40%; left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === Glass Card === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px var(--glass-shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* === Container === */
.container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 3rem;
}

/* === Header === */
.header {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Form === */
.form-card {
    padding: 1rem;
}

.btn-toggle {
    width: 100%;
    padding: 0.85rem;
    background: rgba(108, 99, 255, 0.3);
    border: 1px solid rgba(108, 99, 255, 0.5);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: rgba(108, 99, 255, 0.5);
}

.hidden {
    display: none !important;
}

.form-group {
    margin-top: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.form-group small {
    color: rgba(255,255,255,0.4);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input[type="date"] {
    color-scheme: dark;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-success {
    background: rgba(0, 200, 151, 0.25);
    border: 1px solid rgba(0, 200, 151, 0.5);
    color: var(--success);
}

.btn-success:hover {
    background: rgba(0, 200, 151, 0.4);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.35);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* === Sections === */
.section {
    margin-top: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

/* === Task Cards === */
.tarea-card {
    position: relative;
}

.tarea-card.vencida {
    border-color: rgba(255, 71, 87, 0.5);
    background: rgba(255, 71, 87, 0.1);
}

.tarea-card.completada {
    opacity: 0.6;
}

.tarea-card.completada h3 {
    text-decoration: line-through;
}

.tarea-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.tarea-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    flex: 1;
}

.tarea-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    line-height: 1.5;
}

.tarea-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.tarea-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

/* === Badges === */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.vencido {
    background: rgba(255, 71, 87, 0.3);
    color: #ff6b7a;
    border: 1px solid rgba(255, 71, 87, 0.5);
}

.badge.pendiente-limite {
    background: rgba(255, 165, 2, 0.2);
    color: #ffc048;
    border: 1px solid rgba(255, 165, 2, 0.4);
}

.badge.completado {
    background: rgba(0, 200, 151, 0.2);
    color: var(--success);
    border: 1px solid rgba(0, 200, 151, 0.4);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1.1rem;
}

/* === Tablet+ === */
@media (min-width: 640px) {
    .container {
        padding: 2rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .tarea-actions {
        justify-content: flex-end;
    }

    .shape-1 { width: 400px; height: 400px; }
    .shape-2 { width: 350px; height: 350px; }
    .shape-3 { width: 280px; height: 280px; }
}
