/* Fit Together - Styles */

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

:root {
    --primary: #FF6B9D;
    --secondary: #FFA726;
    --accent: #9C27B0;
    --success: #4CAF50;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Animated background bubbles */
.bubble {
    position: fixed;
    bottom: -100px;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 15s infinite ease-in-out;
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    50% {
        transform: translateY(-800px) translateX(100px) rotate(180deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: 'Fredoka', cursive;
    font-size: 3.5rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.tagline {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 157, 0.4);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

.main-grid {
    display: grid;
    gap: 30px;
}

.tab-content .card {
    max-width: 800px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-family: 'Fredoka', cursive;
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    font-size: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
    transform: translateY(-2px);
}

button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Fredoka', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
}

button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover:before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 157, 0.4);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-value {
    font-family: 'Fredoka', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

/* Leaderboard */
.person-entry {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1) 0%, rgba(255, 167, 38, 0.1) 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(255, 107, 157, 0.2);
    transition: all 0.3s ease;
}

.person-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.2);
}

.person-info {
    flex: 1;
}

.person-name {
    font-family: 'Fredoka', cursive;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.person-stats {
    display: flex;
    gap: 20px;
    color: #555;
    font-size: 0.95rem;
    font-weight: 600;
}

.medals {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.medal {
    font-size: 2rem;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Encouragement */
.encouragement {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary);
    animation: confetti-fall 3s linear forwards;
    z-index: 9999;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
}

/* Motivational Quote */
.motivational-quote {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tab-button {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .tab-nav {
        gap: 8px;
    }

    .person-stats {
        flex-direction: column;
        gap: 8px;
    }
}
