* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0f172a;
    min-height: 100vh;
    color: #f1f5f9;
    overflow-x: hidden;
    position: relative;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #0f172a, #1e293b, #334155);
    overflow: hidden;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    background: #10b981;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    background: #3b82f6;
    top: 60%;
    left: 80%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    background: #f59e0b;
    top: 30%;
    left: 70%;
    animation-delay: -10s;
    animation-duration: 20s;
}

.floating-element:nth-child(4) {
    width: 100px;
    height: 100px;
    background: #ec4899;
    top: 80%;
    left: 20%;
    animation-delay: -15s;
    animation-duration: 35s;
}

.floating-element:nth-child(5) {
    width: 90px;
    height: 90px;
    background: #8b5cf6;
    top: 10%;
    left: 50%;
    animation-delay: -8s;
    animation-duration: 28s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(15px) rotate(240deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-container {
    background: linear-gradient(145deg, #1e293b, #334155);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    animation: authSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes authSlideIn {
    to { transform: scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #334155;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: rgba(30, 41, 59, 0.8);
}

.form-input::placeholder {
    color: #64748b;
}

.auth-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #94a3b8;
}

.auth-switch button {
    background: none;
    border: none;
    color: #10b981;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s ease;
    position: relative;
}

.nav-link:hover {
    color: #10b981;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #10b981;
    transition: all 0.4s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: #e2e8f0;
    font-weight: 500;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.hero-section {
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    margin: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a"><stop offset="0%" stop-color="%2316a085" stop-opacity="0.1"/><stop offset="100%" stop-color="%232980b9" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') center/cover;
    z-index: -1;
    animation: backgroundPulse 10s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.05); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: slideInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease-out 0.2s both;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    gap: 3rem;
    margin-top: 3rem;
    animation: slideInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #f1f5f9;
}

.mood-slider {
    position: relative;
    margin: 1.5rem 0;
}

.mood-input {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.mood-input::-webkit-slider-thumb {
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: 3px solid #10b981;
    transition: all 0.4s ease;
}

.mood-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.mood-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.mood-labels #mood-emoji {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
}

.journal-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.4s ease;
    background: rgba(30, 41, 59, 0.5);
    color: #f1f5f9;
    backdrop-filter: blur(10px);
}

.journal-textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: rgba(30, 41, 59, 0.8);
}

.journal-textarea::placeholder {
    color: #64748b;
}

.btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.exercise-btn {
    background: rgba(30, 41, 59, 0.6);
    color: #e2e8f0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.exercise-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.exercise-content {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border-left: 4px solid #10b981;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.exercise-content.show {
    opacity: 1;
    transform: translateY(0);
}

.progress-chart {
    margin-top: 1.5rem;
    height: 300px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.streak-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.1));
    border-radius: 16px;
    margin: 1rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.streak-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.streak-label {
    font-size: 1.1rem;
    color: #fbbf24;
    margin-top: 0.5rem;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.badge {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1f2937;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transform: scale(0);
    animation: badgeAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.quote-container {
    background: rgba(59, 130, 246, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.quote-text {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.quote-author {
    font-size: 0.9rem;
    color: #94a3b8;
}

.chat-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message {
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #10b981;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: #e2e8f0;
}

.crisis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

.crisis-content {
    background: linear-gradient(145deg, #1e293b, #334155);
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.crisis-title {
    color: #ef4444;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.help-links {
    list-style: none;
    margin: 2rem 0;
}

.help-links li {
    margin: 1rem 0;
}

.help-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: inline-block;
    transition: all 0.4s ease;
    background: rgba(16, 185, 129, 0.1);
}

.help-links a:hover {
    background: #10b981;
    border-color: #10b981;
    transform: translateY(-2px);
}

.floating-action {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.floating-action:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes badgeAppear {
    from { transform: scale(0) rotate(-180deg); }
    to { transform: scale(1) rotate(0deg); }
}

@keyframes breathe {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.breathe-animation {
    animation: breathe 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .auth-container {
        margin: 1rem;
        padding: 2rem;
    }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}