/**
 * Smiley Faces Bank App - Main Stylesheet
 * A colorful, kid-friendly design!
 */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --primary-yellow: #FFD93D;
    --primary-orange: #FF9F43;
    --success-green: #6BCB77;
    --danger-red: #FF6B6B;
    --accent-purple: #9B59B6;
    --accent-blue: #4ECDC4;
    --accent-pink: #FF6B9D;

    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E9ECEF;
    --dark-gray: #6C757D;
    --text-dark: #2D3436;
    --text-light: #636E72;

    /* Gradients */
    --gradient-rainbow: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-sunset: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 55%, #FF99AC 100%);
    --gradient-ocean: linear-gradient(135deg, #667eea 0%, #4ECDC4 100%);
    --gradient-candy: linear-gradient(135deg, #FFD93D 0%, #FF9F43 50%, #FF6B6B 100%);
    --gradient-forest: linear-gradient(135deg, #6BCB77 0%, #4ECDC4 100%);

    /* Shadows */
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-large: 0 15px 35px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(255, 217, 61, 0.4);

    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 10px;
    --radius-large: 16px;
    --radius-round: 50%;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Font */
    --font-primary: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--gradient-ocean);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.floating-smileys {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.float-smiley {
    position: absolute;
    font-size: 3rem;
    animation: floatUp 8s infinite;
    animation-delay: var(--delay);
    left: var(--x);
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        bottom: -100px;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        bottom: calc(100vh + 100px);
        transform: translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

.login-container {
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-large);
    padding: 40px;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.big-smiley {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.login-header h1 {
    color: var(--text-dark);
    margin-top: 10px;
    background: var(--gradient-candy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 5px;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-small);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.2);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-candy);
    color: var(--text-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--medium-gray);
}

.btn-secondary:hover {
    border-color: var(--primary-yellow);
}

.btn-success {
    background: var(--success-green);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-red);
    color: var(--white);
}

.btn-warning {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-large {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ===== Error & Alert Messages ===== */
.error-message,
.alert {
    padding: 10px 15px;
    border-radius: var(--radius-small);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

.error-message,
.alert-error {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger-red);
    border: 2px solid var(--danger-red);
}

.alert-success {
    background: rgba(107, 203, 119, 0.2);
    color: var(--success-green);
    border: 2px solid var(--success-green);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ===== Navbar ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 2rem;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-candy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-medium);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-yellow);
}

.nav-logout:hover {
    background: var(--danger-red);
    color: var(--white);
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* ===== Welcome Section ===== */
.welcome-section {
    text-align: center;
    margin-bottom: 15px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-text {
    font-size: 1.5rem;
}

.highlight {
    background: var(--primary-yellow);
    padding: 3px 10px;
    border-radius: var(--radius-medium);
    color: var(--text-dark);
    text-shadow: none;
}

.welcome-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== Balance Card ===== */
.balance-card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    margin-bottom: 15px;
    animation: slideUp 0.6s ease-out;
}

.balance-header {
    margin-bottom: 10px;
}

.balance-icon {
    font-size: 2rem;
    display: inline-block;
}

.balance-icon.bounce {
    animation: bounce 2s infinite;
}

.balance-display {
    margin: 15px 0;
}

.balance-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-candy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.balance-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

.smileys-visual {
    font-size: 1.5rem;
    line-height: 1.5;
    padding: 12px;
    background: var(--light-gray);
    border-radius: var(--radius-medium);
}

.no-smileys {
    color: var(--text-light);
    font-size: 1.2rem;
}

.more-smileys {
    display: inline-block;
    background: var(--primary-yellow);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Custom Smiley Icons */
.smiley-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    animation: wiggle 2s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.smiley-icon:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

/* ===== Achievement Cards ===== */
.achievement-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: var(--radius-medium);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.achievement-card.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.achievement-card.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.4);
}

.achievement-card.bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: var(--white);
}

.achievement-icon {
    font-size: 1.8rem;
}

.achievement-text {
    font-size: 1.1rem;
    font-weight: 800;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ===== Recent Activity ===== */
.recent-activity {
    background: var(--white);
    border-radius: var(--radius-medium);
    padding: 15px;
    box-shadow: var(--shadow-soft);
}

.recent-activity h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--radius-medium);
    transition: var(--transition-fast);
}

.activity-item:hover {
    transform: translateX(5px);
}

.activity-item.add {
    border-left: 4px solid var(--success-green);
}

.activity-item.remove {
    border-left: 4px solid var(--danger-red);
}

.activity-icon {
    font-size: 1.5rem;
}

.activity-details {
    flex: 1;
}

.activity-amount {
    font-weight: 700;
    font-size: 1.2rem;
}

.activity-amount.add {
    color: var(--success-green);
}

.activity-amount.remove {
    color: var(--danger-red);
}

.activity-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--dark-gray);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.empty-state-small {
    text-align: center;
    padding: 20px;
}

/* ===== Timeline (History) ===== */
.history-timeline {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
}

.timeline-date {
    font-weight: 700;
    color: var(--accent-purple);
    padding: 10px 0;
    margin-top: 15px;
    border-top: 2px dashed var(--medium-gray);
}

.timeline-date:first-child {
    border-top: none;
    margin-top: 0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-icon {
    font-size: 1.5rem;
}

.timeline-content {
    flex: 1;
}

.timeline-amount {
    display: flex;
    align-items: center;
    gap: 5px;
}

.amount-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.amount-value.add {
    color: var(--success-green);
}

.amount-value.remove {
    color: var(--danger-red);
}

.amount-emoji {
    font-size: 1.2rem;
}

.timeline-desc {
    color: var(--text-light);
    margin: 5px 0;
}

.timeline-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

/* ===== Balance Mini ===== */
.balance-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 15px 25px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
    font-weight: 600;
}

.balance-mini .balance-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-purple);
}

/* ===== Page Header ===== */
.page-header {
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 5px;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--white);
    opacity: 0.8;
}

/* ===== Admin Specific ===== */
.admin-nav {
    background: linear-gradient(90deg, var(--white) 0%, #f8f0ff 100%);
}

.admin-dashboard {
    background: var(--gradient-rainbow);
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-large);
    padding: 25px;
    box-shadow: var(--shadow-medium);
}

.card h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    margin-bottom: 0;
}

/* ===== Kid Card (Admin) ===== */
.kid-card {
    background: var(--light-gray);
    border-radius: var(--radius-medium);
    padding: 20px;
    margin-bottom: 15px;
}

.kid-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.kid-avatar {
    font-size: 2.5rem;
}

.kid-details h3 {
    margin-bottom: 2px;
}

.kid-username {
    color: var(--text-light);
    font-size: 0.9rem;
}

.kid-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: var(--radius-medium);
}

.kid-balance .balance-number {
    font-size: 2.5rem;
    background: var(--gradient-candy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kid-balance .balance-emoji {
    font-size: 2rem;
}

.kid-actions {
    margin-top: 10px;
}

.quick-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.amount-input {
    width: 70px !important;
    padding: 8px 10px !important;
}

.desc-input {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px !important;
}

/* ===== Quick Stats ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--radius-medium);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-candy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-light);
    font-weight: 600;
}

/* ===== Activity Table ===== */
.activity-table {
    overflow-x: auto;
}

.activity-table table,
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th,
.activity-table td,
.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.activity-table th,
.history-table th {
    background: var(--light-gray);
    font-weight: 700;
    color: var(--text-dark);
}

.activity-table tr:hover,
.history-table tr:hover {
    background: var(--light-gray);
}

.add-row {
    background: rgba(107, 203, 119, 0.1);
}

.remove-row {
    background: rgba(255, 107, 107, 0.1);
}

.amount-cell.add {
    color: var(--success-green);
    font-weight: 700;
}

.amount-cell.remove {
    color: var(--danger-red);
    font-weight: 700;
}

/* ===== Manage Grid ===== */
.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.manage-form,
.add-kid-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.action-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* ===== Quick Rewards ===== */
.reward-kid-section {
    margin-bottom: 20px;
}

.reward-kid-section h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.reward-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.reward-btn {
    padding: 12px 20px;
    background: var(--gradient-ocean);
    border: none;
    border-radius: var(--radius-medium);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.reward-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* ===== History Table ===== */
.history-table-wrapper {
    overflow-x: auto;
}

.date-cell {
    display: flex;
    flex-direction: column;
}

.date-cell .date {
    font-weight: 600;
}

.date-cell .time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.type-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.type-badge.add {
    background: rgba(107, 203, 119, 0.2);
    color: var(--success-green);
}

.type-badge.remove {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger-red);
}

.balance-cell {
    font-weight: 600;
    color: var(--accent-purple);
}

.reason-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Mobile & Tablet Responsive (iPad/iPhone) ===== */

/* Touch-friendly enhancements */
@media (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 14px 24px;
    }

    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
    }

    .form-group input,
    .form-group select {
        min-height: 50px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .amount-input,
    .desc-input {
        min-height: 48px;
        font-size: 16px;
    }
}

/* iPad Pro & iPad (landscape and portrait) */
@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .manage-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iPad Mini & smaller tablets */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .main-content {
        padding: 20px 15px;
    }

    .balance-number {
        font-size: 4rem;
    }

    .login-card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .kid-card {
        flex-direction: column;
        text-align: center;
    }

    .kid-actions {
        width: 100%;
    }

    .kid-actions .quick-action-form {
        flex-direction: column;
        gap: 10px;
    }

    .amount-input,
    .desc-input {
        width: 100% !important;
    }

    .quick-action-form .btn {
        width: 100%;
        justify-content: center;
    }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .manage-grid {
        grid-template-columns: 1fr;
    }

    .balance-card {
        padding: 25px 20px;
    }

    .smileys-visual {
        padding: 15px;
    }

    .smiley-icon {
        width: 35px;
        height: 35px;
    }

    /* Table responsive */
    .activity-table {
        overflow-x: auto;
    }

    .activity-table table {
        min-width: 500px;
    }
}

/* iPhone and smaller phones */
@media (max-width: 480px) {
    .navbar {
        padding: 12px;
    }

    .nav-brand {
        flex-direction: column;
        gap: 5px;
    }

    .nav-title {
        font-size: 1.2rem;
    }

    .nav-links {
        width: 100%;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 15px 10px;
    }

    .balance-number {
        font-size: 3rem;
    }

    .balance-label {
        font-size: 1.1rem;
    }

    .welcome-text {
        font-size: 1.4rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 20px 15px;
    }

    .smiley-icon {
        width: 30px;
        height: 30px;
    }

    .achievement-card {
        padding: 15px 20px;
        gap: 10px;
    }

    .achievement-icon {
        font-size: 2rem;
    }

    .achievement-text {
        font-size: 1.2rem;
    }

    .btn-large {
        padding: 16px 20px;
        font-size: 1.1rem;
    }

    .quick-reward-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    /* Activity items mobile */
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .activity-icon {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .activity-item {
        position: relative;
        padding-right: 50px;
    }

    /* Timeline mobile */
    .timeline-meta {
        flex-direction: column;
        gap: 5px;
    }

    /* Form adjustments */
    .form-group label {
        font-size: 1rem;
    }

    .login-card {
        padding: 25px 15px;
    }

    .big-smiley {
        font-size: 3rem;
    }

    .login-header h1 {
        font-size: 1.6rem;
    }
}

/* Safe area for iPhone notch */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }

    .main-content {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* ===== Animations ===== */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-200px) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    pointer-events: none;
    animation: confetti 2s ease-out forwards;
}