* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins';
    background: linear-gradient(to bottom right, #a374dd, #030242);
    min-height: 100vh;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 15vh;
    background: linear-gradient(to right, #8650b0, #2e0465);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    padding: 30px;
    padding-left: 0px;
    line-height: 1;
}

.logo {
    color: yellow;
    font-size: 40px;
    font-weight: bold;
    margin-left: 20px;

}

.tagline {
    font-size: 14px;
    padding-left: 20px;

}

.header-right {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
}

.menu-btn {
    background: blueviolet;
    text-align: center;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    display: none;
    transition: 0.2s ease;
}

.menu-btn:hover {
    background: #6d28d9;
}

.desktop-nav {
    display: flex;
    gap: 15px;
    padding-right: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    padding-right: 20px;
}

.nav-link:hover {
    transform: scale(1.1);
    background: white;
    color: blueviolet;
    font-weight: 600;
    box-shadow: -2px 2px 10px black;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.username {
    font-weight: bold;
}

.logout-btn {
    background: #ffb700;
    margin-right: 20px;
    margin-left: 10px;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

.logout-btn:hover {
    background: #f59e0b;
    transform: scale(1.1);
}

.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: none;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 16rem;
    height: 100%;
    background: linear-gradient(to right, #8650b0, #2e0465);
    padding: 1.5rem;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background 0.3s;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.auth-container {
    max-width: 40rem;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    padding: 2rem;
}

.auth-title {
    color: yellow;
    font-size: 2rem;
    line-height: 1;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.form-input {
    height: 35px;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: none;
    background: white;
    color: rgb(31, 23, 23);
    font-size: 1rem;
}

#taskCategory {
    height: 45px;
}

.button-group {
    display: flex;
    gap: 0.75rem;
}

.btn-primary {
    flex: 1;
    background: #fbbf24;
    color: #1e3a8a;
    border: none;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #f59e0b;
}

.btn-secondary {
    background: blueviolet;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: rgb(120, 34, 201);
}

.full-width {
    width: 100%;
}

.message {
    color: #fef3c7;
    text-align: center;
    min-height: 1.5rem;
}

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 1.5rem 0;
}

.login-title {
    color: yellow;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-btn {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #6d28d9;
}

.toggle-btn.active {
    background: #5b21b6;
    transform: scale(1.1);
}

.card {
    background: rgba(137, 43, 226, 0.079);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 25px black;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.task-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.flex-1 {
    flex: 1;
    min-width: 16rem;
}

.w-32 {
    width: 8rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.btn-add {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.btn-add:hover {
    background: #6d28d9;
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-label {
    font-size: 0.875rem;
}

.progress-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    height: 0.75rem;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(to right, #4ade80, #16a34a);
    height: 100%;
    width: 0%;
    transition: width 0.5s;
}

.progress-percent {
    font-weight: bold;
}

.section-title {
    color: #fde047;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.task-item.done {
    opacity: 0.6;
}

.task-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.task-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    background: #7c3aed;
}

.task-icon.done {
    background: #10b981;
}

.task-info {
    flex: 1;
}

.task-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.task-duration {
    display: inline-block;
    font-size: 0.875rem;
    background: #7c3aed;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.task-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-done {
    flex: 1;
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-done:hover {
    background: #6d28d9;
}

.btn-delete {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: rgba(255, 255, 255, 0.2);
}

.empty-state {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.75rem;
}

/* Notes */
.note-textarea {
    width: 100%;
    height: 8rem;
    padding: 1rem;
    border-radius: 0.375rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: black;
    resize: none;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.btn-save {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-save:hover {
    background: #6d28d9;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

.analysis-title {
    color: #fde047;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.analysis-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.analysis-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.analysis-card:hover {
    transform: scale(1.05);
}

.analysis-card-title {
    color: #fde047;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.analysis-card-text {
    font-size: 0.875rem;
}

.btn-analysis {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.btn-analysis:hover {
    background: #6d28d9;
}

.analysis-output {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 1.5rem;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.875rem;
}

.footer {
    margin-top: 3rem;
    text-align: center;
    padding-bottom: 2rem;
}

.footer-credit {
    font-size: 0.875rem;
    opacity: 0.75;
    margin-top: 0.5rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(to right, #8650b0, #2e0465);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    max-width: 28rem;
    width: 80%;
    height: 120px;
}

.modal-title {
    color: #fde047;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.modal-message {
    margin-bottom: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn-confirm {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn-confirm:hover {
    background: #b91c1c;
}

@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    .menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .tagline {
        font-size: 12px;
    }

    .task-input-row {
        flex-direction: column;
    }

    .menu-btn {
        transform: scale(0.8);
        margin-left: 0px;
    }

    #logoutBtn {
        transform: scale(0.8);
    }

    .flex-1,
    .w-32 {
        width: 100%;
    }

    .btn-add {
        width: 100%;
    }
}

@media (max-width: 450px) {
    .user-section {
        display: flex;
        flex-direction: column;
        margin: 0px;
        padding: 0px;
    }
}
