@import url('./fonts.css');

:root {
    --primary: #ec4899;
    --background: #f9f9fb;
    --card: #ffffff;
    --done: #e2e8f0;
    --text: #2d3748;
    --border: #f9a8d4;
    --shadow: rgba(236, 72, 153, 0.15);
    --accent: #f472b6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Vazirmatn";
}

body {
    font-family: "Vazirmatn";
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.app {
    max-width: 450px;
    width: 100%;
    padding: 1.5rem;
    position: relative;
}

.auth-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.auth-button:hover {
    background: #db2777;
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow);
    width: 280px;
    text-align: center;
    animation: scaleUp 0.3s ease;
}

.modal-content h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 0.7rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: #fff;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: var(--primary);
}

.modal-content button {
    width: 100%;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.modal-content button:hover {
    background: #db2777;
}

.modal-content p {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text);
}

.modal-content p a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

h1 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#taskForm {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

input[type="text"] {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 1.2rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--card);
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--shadow);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
    background: #db2777;
    transform: scale(1.05);
}

.add-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.add-button:hover {
    background: #db2777;
    transform: scale(1.05);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card);
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 6px var(--shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: scaleUp 0.3s ease;
}

.todo-item.done {
    opacity: 0.7;
    background: var(--done);
    text-decoration: line-through;
}

.todo-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.todo-item span {
    flex: 1;
    font-size: 1rem;
}

.todo-item button {
    background: transparent;
    color: var(--accent);
    font-size: 1.2rem;
    padding: 0.5rem;
}

.todo-item button:hover {
    color: #db2777;
    transform: scale(1.1);
}

.tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 450px;
    margin: 0 auto;
    background: var(--card);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    box-shadow: 0 -2px 8px var(--shadow);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    border-radius: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.tab:hover {
    background: var(--border);
    transform: scale(1.05);
}

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--shadow);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.card {
    background: var(--card);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.collapsible {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: right;
    padding: 0.5rem 0;
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.content.show {
    max-height: 200px;
}

.challenge-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.challenge-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.challenge-day {
    font-size: 0.9rem;
    color: var(--text);
}

.challenge-goal {
    font-size: 0.9rem;
    color: var(--text);
}

.challenge-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.challenge-buttons button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.challenge-buttons .next-day {
    background: var(--primary);
    color: white;
}

.challenge-buttons .next-day:hover {
    background: #db2777;
}

.challenge-buttons .prev-day {
    background: var(--border);
    color: var(--primary);
}

.challenge-buttons .prev-day:hover {
    background: #f472b6;
}

.challenge-buttons .delete {
    background: var(--accent);
    color: white;
}

.challenge-buttons .delete:hover {
    background: #db2777;
}

.team-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.team-desc {
    font-size: 0.9rem;
    color: var(--text);
}
