@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Navbar Modern */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.navbar h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-right span {
    color: #555;
    font-weight: 500;
    font-size: 15px;
}

/* Card Modern dengan Glassmorphism */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    max-width: 480px;
    margin: 80px auto;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h1 {
    color: #1a1a1a;
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -1px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 35px;
    font-size: 15px;
    font-weight: 400;
}

/* Form Modern */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons Modern */
.btn {
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.btn-logout {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 12px 24px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-edit {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3a0 100%);
    color: white;
    padding: 10px 20px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 10px 20px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Alerts Modern */
.alert {
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: linear-gradient(135deg, #ffe0e0 0%, #ffebee 100%);
    color: #c62828;
    border-left-color: #d32f2f;
}

.alert-success {
    background: linear-gradient(135deg, #e0f7e0 0%, #e8f5e9 100%);
    color: #2e7d32;
    border-left-color: #43a047;
}

/* Text Center */
.text-center {
    text-align: center;
    margin-top: 25px;
    color: #666;
    font-size: 14px;
}

.text-center a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 700;
    position: relative;
}

.text-center a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.text-center a:hover::after {
    width: 100%;
}

/* Dashboard Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 20px 0;
}

.header h1 {
    color: white;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Tasks Grid dengan Masonry Layout */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Task Card Super Modern */
.task-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.task-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8);
}

.task-card:hover::before {
    transform: scaleX(1);
}

.task-card.task-done {
    opacity: 0.75;
    background: rgba(245, 245, 245, 0.95);
}

.task-card.task-done .task-header h3 {
    text-decoration: line-through;
    color: #999;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 15px;
}

.task-header h3 {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-badge.pending {
    background: linear-gradient(135deg, #ffd93d 0%, #ffb800 100%);
    color: #664d00;
}

.status-badge.done {
    background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 100%);
    color: white;
}

.task-description {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 50px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 2px solid #f0f0f0;
}

.deadline {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-actions {
    display: flex;
    gap: 10px;
}

/* Empty State Modern */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 2px dashed #e0e0e0;
}

.empty-state h3 {
    color: #333;
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
}

.empty-state p {
    color: #666;
    font-size: 16px;
    font-weight: 400;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 35px;
}

.form-actions .btn {
    flex: 1;
}

/* Scrollbar Custom */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8c 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .header h1 {
        font-size: 32px;
        text-align: center;
    }
    
    .header .btn {
        width: 100%;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .card {
        padding: 35px 25px;
        margin: 40px 20px;
    }
    
    .task-card {
        padding: 22px;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .card h1 {
        font-size: 26px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .task-header h3 {
        font-size: 18px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 16px;
        font-size: 14px;
    }
}