:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #818cf8;
    --bg-dark: #0f172a;
    --text-main: #1e293b;
    --text-sec: #64748b;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.4);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(-45deg, #e0e7ff, #c7d2fe, #a5b4fc, #818cf8);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Background Animated Shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #fbbf24;
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #3b82f6;
    top: 40%;
    left: 60%;
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 45px 35px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 35px;
}

.dev-logo {
    color: var(--text-main);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.dev-logo span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-sec);
    font-size: 1.05rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

input[type="text"] {
    flex: 1;
    padding: 16px 22px;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,0.8);
    background: rgba(255, 255, 255, 0.65);
    font-size: 1.05rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

input:focus, select:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.time-picker-section {
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.4) 100%);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.time-picker-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; 
    gap: 6px;
}

.time-picker-group select, .time-picker-group input[type="date"] {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-picker-group select:hover, .time-picker-group input[type="date"]:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.sound-picker-group {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.sound-label {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 700;
}

.sound-picker-group select {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    transition: all 0.2s ease;
}

.sound-picker-group select:hover {
    border-color: var(--primary-light);
}

#previewSoundBtn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#previewSoundBtn:hover {
    transform: scale(1.15) rotate(5deg);
    background: var(--primary-hover);
}

.colon {
    font-weight: 700;
    color: var(--text-sec);
    font-size: 1.2rem;
}

.time-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-top: 12px;
    width: 100%;
}

#addBtn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 18px;
    width: 58px;
    height: 58px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

#addBtn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45);
}

#addBtn:active {
    transform: translateY(1px);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    background: rgba(255,255,255,0.4);
    padding: 6px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.5);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-sec);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid white;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideIn 0.4s ease forwards;
}

.task-item:hover {
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-item.completed {
    background: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid var(--primary-light);
    cursor: pointer;
    margin-right: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    background: white;
}

.task-item.completed .task-checkbox {
    background: var(--success);
    border-color: var(--success);
    transform: rotate(360deg);
}

.task-item.completed .task-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: white;
}

.task-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.3s ease;
    word-break: break-word;
}

.delete-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    margin-left: 10px;
}

.delete-btn:hover {
    color: var(--danger);
    transform: scale(1.2) rotate(10deg);
}

.empty-state {
    text-align: center;
    color: var(--text-sec);
    padding: 30px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Modal CSS */
.alarm-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.alarm-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.alarm-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    max-width: 90%;
    width: 400px;
}

.alarm-title {
    color: var(--danger);
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
}

.ringing {
    animation: ring 0.5s infinite ease-in-out;
    display: inline-block;
}

.alarm-content p {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
}

#stopAlarmBtn {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

#stopAlarmBtn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ring {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(-5deg); }
    70% { transform: rotate(5deg); }
    80% { transform: rotate(-2deg); }
    90% { transform: rotate(2deg); }
    100% { transform: rotate(0deg); }
}

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

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}
