body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: white;
    background: radial-gradient(circle at top, #1f1f3a, #0f0f0f);
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: #4f46e5;
    filter: blur(150px);
    top: -100px;
    left: -100px;
    opacity: 0.3;
}

.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(15px);
    padding: 45px 35px;
    border-radius: 24px;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);

    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h1 {
    color: #4f46e5;
    margin-bottom: 5px;
}

.login-card p {
    color: #aaa;
    margin-bottom: 25px;
}


.input-group {
    position: relative;
    margin-bottom: 22px;
}

.input-group input {
    width: 100%;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: #111;
    color: white;
    transition: 0.3s;
}

.input-group input:focus {
    border: 1px solid #4f46e5;
    box-shadow: 0 0 10px rgba(79,70,229,0.5);
}

.input-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #777;
    font-size: 14px;
    transition: 0.2s;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -8px;
    font-size: 11px;
    color: #4f46e5;
    background: #1a1a1a;
    padding: 0 6px;
}


#loginBtn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* efeito brilho */
#loginBtn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

#loginBtn:hover::after {
    left: 100%;
}

/* click feedback */
#loginBtn:active {
    transform: scale(0.97);
}

.loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    margin: auto;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* estado loading */
.loading .btn-text {
    display: none;
}

.loading .loader {
    display: block;
}

#erro {
    margin-top: 12px;
    font-size: 13px;
    color: #ff4d4d;
    opacity: 0;
    transition: 0.3s;
}

#erro.show {
    opacity: 1;
}

li:hover {
    background: #2f2f2f;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

li button {
    background: transparent;
    font-size: 16px;
    border: none;
    color: red;
}

li button:hover {
    transform: scale(1.2);
}

.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.filters {
    flex: 1;
    gap: 5px;
    margin-bottom: 10px;
}

.filters button {
    flex: 1;
    background-color: #333;
}

.filters button.active {
    background-color: #4f46e5;
}

.fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: 0.3s;
}

#logout {
    width: 100%;
    margin-bottom: 15px;
    background-color: #333;
}

#logout:hover {
    background-color: #444;
}

.app-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 220px;
    background: rgba(20,20,20,0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid #222;
}

.sidebar h2 {
    color: #4f46e5;
    margin-bottom: 15px;
}

.sidebar button {
    background: #1f1f1f;
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.sidebar button:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.sidebar button.active {
    background: #4f46e5;
    transform: scale(0.96);
}

.dashboard {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

header h1 {
    font-size: 24px;
}

header p {
    color: #aaa;
    margin-bottom: 20px;
}

.task-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.task-input input {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #111;
    color: white;
}

.task-input input:focus {
    outline: 2px solid #4f46e5;
}

.task-input button {
    padding: 12px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

ul {
    list-style: none;
    padding: 0;
}

li {
    background: rgba(38,38,38,0.8);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    transition: 0.2s;
}

li:hover {
    transform: translateY(-2px);
    background: #2f2f2f;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

li:hover span {
    color: #fff;
}

li span {
    flex: 1;
}

.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

li button {
    background: transparent;
    border: none;
    color: #ff4d4d;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

li button:hover {
    transform: scale(1.2);
}

.fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: 0.3s;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

.new-task {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty {
    text-align: center;
    margin-top: 40px;
    color: #888;
}

.empty h3 {
    color: #4f46e5;
    margin-bottom: 5px;
}

#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1f1f1f;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}
