* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
}

.status-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content {
    padding: 1.5rem;
    padding-bottom: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: bounceIn 1s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.buddy-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(255, 154, 158, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.app-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 0.5rem;
}

.app-subtitle {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.nav-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 90;
}

.nav-tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.page {
    display: none;
    animation: slideIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.buddy-message {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
    position: relative;
}

.buddy-message::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #f5576c;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 600;
}

.challenge-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.challenge-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.challenge-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.challenge-reward {
    background: linear-gradient(45deg, #ffd89b, #19547b);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.8rem;
    display: inline-block;
}

.progress-bar {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.timer-display {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    color: #333;
    margin: 2rem 0;
    font-family: 'SF Mono', monospace;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 80px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.achievement-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    margin: 0.2rem;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
    }

    to {
        box-shadow: 0 5px 25px rgba(255, 215, 0, 0.6);
    }
}

.mood-selector {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
}

.mood-btn {
    font-size: 2.5rem;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.mood-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.mood-btn.selected {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.2);
}

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.heart {
    position: absolute;
    color: #ff6b6b;
    font-size: 1.5rem;
    animation: floatUp 3s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .content {
        padding: 1rem;
    }

    .buddy-avatar {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .app-title {
        font-size: 1.6rem;
    }

    .nav-tab {
        font-size: 0.8rem;
        padding: 10px 6px;
    }

    .timer-display {
        font-size: 2.5rem;
    }

    .mood-btn {
        font-size: 2rem;
        padding: 0.8rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}