/* css/components.css */

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.auth-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: relative;
}

.theme-toggle-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
}

.auth-card h2 {
    margin-bottom: 24px;
    font-size: 24px;
}

.input-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
}

.input-group input {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.auth-switch {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 16px;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 8px;
}

/* css/components.css (Append this to the bottom) */

.dashboard-container {
    padding-bottom: 80px; /* Space for bottom nav */
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.date-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    background: var(--surface-2);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 18px;
}

.hero-card {
    background: var(--primary-color);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0, 196, 154, 0.2);
}

.hero-card h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.hero-card p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.level-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    gap: 12px;
}

.progress-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.timeline-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px;
    background: var(--surface-2);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    z-index: 100;
}

.nav-item {
    font-size: 24px;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.nav-item.active {
    opacity: 1;
}

.fab-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-15px);
    box-shadow: 0 4px 15px rgba(0, 196, 154, 0.3);
}


/* Modal Backdrop */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none !important;
}

/* Modal Content Box */
.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 680px;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Task Item in Timeline */
.task-card {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: opacity 0.3s;
}

.task-card.completed {
    opacity: 0.5;
    border-color: var(--success);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.task-card.completed .task-checkbox {
    background: var(--success);
    border-color: var(--success);
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}


/* css/components.css additions */
.chat-box-window {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    min-height: 350px;
    max-height: calc(100vh - 260px);
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-bubble.user {
    background: var(--primary-color);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 12px;
    align-self: flex-start;
}


/* Trophy Room Badge Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.badge-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.badge-icon {
    font-size: 40px;
    margin-bottom: 12px;
    filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.1));
}

.badge-card h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.badge-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Locked State */
.badge-card.locked {
    background: var(--surface-2);
    border-style: dashed;
    opacity: 0.6;
}

.badge-card.locked .badge-icon {
    filter: grayscale(100%) opacity(50%);
}

/* Legal & Document Pages */
.legal-container {
    background: var(--surface-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-top: 16px;
    margin-bottom: 80px; /* Space for bottom nav if needed */
}

.legal-content h2 {
    font-size: 18px;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p, .legal-content li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.legal-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}