* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #5C6236;
    min-height: 100vh;
    padding: 10px;
    font-size: 16px; /* Prevents iOS zoom on input focus */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 20px 20px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('../images/hero-background-new.jpeg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-radius: 15px;
    margin: -20px -20px 30px -20px;
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.8s ease-out;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 150px;
    padding-bottom: 10px;
    margin-bottom: 0;
    margin-top: auto;
}

.guinea-flag {
    display: inline-flex;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.flag-stripe {
    flex: 1;
}

.flag-stripe.red {
    background: #CE1126;
}

.flag-stripe.yellow {
    background: #FCD116;
}

.flag-stripe.green {
    background: #009460;
}

.hero-title {
    color: white;
    font-size: 2.5em;
    font-weight: 900;
    margin: 0 0 10px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 3px;
}

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

.hero-subtitle {
    color: #FCD116;
    font-size: 1.5em;
    font-weight: 900;
    margin: 0 0 15px 0;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.hero-description {
    color: rgba(255, 255, 255, 0.98);
    font-size: 1em;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    font-style: italic;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Hero CTA Button */
.hero-cta-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #FCD116 0%, #D4AF37 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(252, 209, 22, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.hero-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FFE066 0%, #FCD116 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hero-cta-btn:hover::before {
    opacity: 1;
}

.hero-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(252, 209, 22, 0.6), 0 6px 15px rgba(0, 0, 0, 0.4);
}

.hero-cta-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(252, 209, 22, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
}

.cta-icon {
    font-size: 1.3em;
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.cta-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cta-arrow {
    font-size: 1.2em;
    animation: bounce-arrow 2s ease-in-out infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 18px 40px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.pulse-animation {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 35px rgba(212, 175, 55, 0.6);
        transform: scale(1.05);
    }
}

.stats-icon {
    font-size: 2.5em;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stats-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stats-number {
    color: #CE1126;
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
}

.stats-label {
    color: #666;
    font-size: 0.9em;
    font-weight: 600;
}

/* Supporter Count Section - Below Hero */
.supporter-count-section {
    text-align: center;
    margin: 30px 0;
    position: relative;
    z-index: 10;
}

.supporter-count-section .stats-badge {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: none;
    border: 2px dashed #D4AF37;
    cursor: default;
    pointer-events: none;
}

.supporter-count-section .stats-icon {
    font-size: 2em;
}

.supporter-count-section .stats-number {
    color: #6B7041;
    font-size: 2.5em;
    font-weight: bold;
}

.supporter-count-section .stats-label {
    color: #666;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

/* Section Titles */
.section-title {
    text-align: center;
    color: #333;
    font-size: 1.8em;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #CE1126, #FCD116, #009460);
    border-radius: 2px;
}

/* Fade-in Animation */
.fade-in-section {
    animation: fadeInUp 0.8s ease-out;
}

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

/* How It Works Section */
.how-it-works {
    margin: 40px 0;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step-card {
    background: white;
    padding: 25px 15px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(206, 17, 38, 0.2);
}

.step-icon {
    font-size: 3em;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
}

.step-card:nth-child(2) .step-icon {
    animation-delay: 0.2s;
}

.step-card:nth-child(3) .step-icon {
    animation-delay: 0.4s;
}

.step-card:nth-child(4) .step-icon {
    animation-delay: 0.6s;
}

.step-number {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #CE1126, #FCD116);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.step-card h4 {
    color: #333;
    font-size: 1.1em;
    margin: 10px 0 8px 0;
}

.step-card p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

/* Input Icons */
.input-icon {
    margin-right: 5px;
}

/* Social Media Share Section */
.share-page-section {
    margin: 30px 0 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    border: 2px solid #6B7041;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.share-page-section h3 {
    color: #333;
    font-size: 1.6em;
    margin-bottom: 8px;
}

.share-subtitle {
    color: #666;
    font-size: 1.05em;
    margin-bottom: 25px;
    font-style: italic;
}

.share-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 16px;
    min-height: 85px;
    min-width: 120px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: translateY(-1px);
}

.share-icon {
    font-size: 1.3em;
    font-weight: bold;
}

.share-label {
    font-size: 0.95em;
}

/* Individual share button colors */
.share-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-color: #25D366;
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

.share-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
    color: white;
    border-color: #1877F2;
}

.share-facebook:hover {
    background: linear-gradient(135deg, #0C63D4 0%, #0A58CA 100%);
}

.share-x {
    background: linear-gradient(135deg, #14171A 0%, #000000 100%);
    color: white;
    border-color: #14171A;
}

.share-x:hover {
    background: linear-gradient(135deg, #000000 0%, #14171A 100%);
}

.share-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    color: white;
    border-color: #0088cc;
}

.share-telegram:hover {
    background: linear-gradient(135deg, #006699 0%, #005580 100%);
}

.share-copy {
    background: linear-gradient(135deg, #6B7041 0%, #5A5E35 100%);
    color: white;
    border-color: #6B7041;
}

.share-copy:hover {
    background: linear-gradient(135deg, #5A5E35 0%, #4A4D2A 100%);
}

.copy-success-msg {
    padding: 12px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 15px;
    animation: slideInUp 0.3s ease-out;
}

/* Floating Community Buttons */
.floating-community-buttons {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: floatIn 0.5s ease-out;
}

@keyframes floatIn {
    from {
        transform: translateY(100px) scale(0);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.floating-icon {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.floating-whatsapp:active {
    transform: scale(0.95);
}

.floating-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C5EBC 100%);
}

.floating-facebook .floating-icon {
    background: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-weight: bold;
    font-size: 20px;
    color: #1877F2;
}

.floating-facebook:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(24, 119, 242, 0.4);
}

.floating-facebook:active {
    transform: scale(0.95);
}

/* Add subtle pulse animation to draw attention */
.floating-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0;
}

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

/* Mobile adjustments for floating buttons */
@media (max-width: 600px) {
    .floating-community-buttons {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
    }

    .floating-icon {
        font-size: 24px;
    }

    .floating-facebook .floating-icon {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Regional Leaderboard Styles */
.regional-leaderboard {
    margin: 30px 0 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #D4AF37;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.regional-leaderboard h3 {
    text-align: center;
    color: #333;
    font-size: 1.8em;
    margin-bottom: 8px;
}

.leaderboard-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.05em;
    margin-bottom: 25px;
    font-style: italic;
}

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

.leaderboard-item {
    display: grid;
    grid-template-columns: 50px 1fr 100px;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaderboard-first {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    border: 3px solid #D4AF37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.leaderboard-first:hover {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.leaderboard-rank {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    grid-row: 1 / 3;
}

.leaderboard-first .leaderboard-rank {
    font-size: 2.2em;
}

.leaderboard-region {
    font-weight: bold;
    color: #333;
    font-size: 1.15em;
}

.leaderboard-first .leaderboard-region {
    color: #6B7041;
    font-size: 1.25em;
}

.leaderboard-count {
    text-align: right;
    color: #666;
    font-size: 0.95em;
    font-weight: 600;
}

.leaderboard-first .leaderboard-count {
    color: #D4AF37;
    font-weight: bold;
    font-size: 1em;
}

.leaderboard-bar {
    grid-column: 2 / 3;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.leaderboard-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6B7041 0%, #D4AF37 100%);
    border-radius: 10px;
    transition: width 1s ease-out;
    animation: fillBar 1.5s ease-out;
}

.leaderboard-first .leaderboard-bar-fill {
    background: linear-gradient(90deg, #D4AF37 0%, #FFD700 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

@keyframes fillBar {
    from {
        width: 0 !important;
    }
}

.leaderboard-percentage {
    text-align: right;
    color: #666;
    font-weight: bold;
    font-size: 0.95em;
}

.leaderboard-first .leaderboard-percentage {
    color: #D4AF37;
    font-size: 1.05em;
}

.upload-section {
    text-align: center;
    margin: 40px 0;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.input-group input[type="text"],
.input-group input[type="tel"],
.input-group select {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 3px solid #D4AF37;
    border-radius: 50px;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    background: white;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

.input-group input[type="text"]:focus,
.input-group input[type="tel"]:focus,
.input-group select:focus {
    border-color: #B8941E;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.3);
}

.upload-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6B7041 0%, #5A5E35 100%);
    color: white;
    padding: 18px 35px;
    min-height: 56px; /* Touch-friendly */
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation; /* Prevents double-tap zoom */
    -webkit-user-select: none;
    user-select: none;
}

.upload-btn:active {
    transform: scale(0.98);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 112, 65, 0.5);
}

.upload-btn input[type="file"] {
    display: none;
}

.mobile-hint {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    font-style: italic;
}

.canvas-section {
    text-align: center;
    margin: 40px 0;
}

#photo-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 16px 32px;
    min-height: 52px; /* Touch-friendly */
    min-width: 120px;
    border: none;
    border-radius: 50px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941E 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #6B7041 0%, #5A5E35 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    box-shadow: 0 10px 25px rgba(107, 112, 65, 0.4);
}

.btn-tertiary {
    background: #f5f5f5;
    color: #333;
}

.btn-tertiary:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp:hover:not(:disabled) {
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

.btn-whatsapp .whatsapp-icon {
    font-size: 1.2em;
    margin-right: 5px;
}

.btn-whatsapp::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;
}

.btn-whatsapp:active::before {
    width: 300px;
    height: 300px;
}

.message-box {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
}

.message-box.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.message-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.share-success {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #25D366;
    animation: slideInUp 0.5s;
}

.share-success p {
    margin: 0;
    font-size: 1.1em;
}

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

/* Referral hint indicator */
.referral-hint {
    margin-top: 25px;
    padding: 20px;
    text-align: center;
    animation: slideInUp 0.5s ease-out, pulseGently 2s ease-in-out infinite 1s;
}

.hint-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #FCD116 0%, #D4AF37 100%);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(252, 209, 22, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hint-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(252, 209, 22, 0.5);
    background: linear-gradient(135deg, #FFE066 0%, #FCD116 100%);
}

.hint-content:active {
    transform: translateY(-1px);
}

.hint-icon {
    font-size: 1.5em;
    animation: bounce 2s ease-in-out infinite;
}

.hint-text {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.3px;
}

.hint-arrow {
    font-size: 1.3em;
    color: #1a1a1a;
    animation: bounce-arrow 2s ease-in-out infinite;
}

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

.supporters-gallery {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.supporters-gallery h3 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.gallery-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.avatar-item {
    text-align: center;
    position: relative;
}

.avatar-image-wrapper {
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    border-radius: 50%;
}

.avatar-image-wrapper:hover {
    transform: translateY(-5px);
}

.avatar-image-wrapper:active {
    transform: translateY(-2px);
}

.avatar-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #D4AF37;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.avatar-image-wrapper:hover img {
    border-color: #6B7041;
    box-shadow: 0 8px 25px rgba(107, 112, 65, 0.4);
}

/* .avatar-share-btn removed - gallery sharing feature removed */
/* .avatar-name removed - now using tooltip instead */

.loading-indicator {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #666;
    font-size: 1.1em;
}

.end-of-results {
    text-align: center;
    padding: 40px 20px;
    margin: 20px 0;
}

.end-of-results p {
    color: #888;
    font-size: 1.2em;
    font-weight: bold;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 15px;
    border: 2px dashed #D4AF37;
}

/* Modal styles - Mobile optimized */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
    overflow: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* Center content */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 100%;
    max-height: 90vh;
    animation: zoomIn 0.3s;
    touch-action: manipulation;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -10px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1001;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
}

.modal-close:hover,
.modal-close:active {
    color: #D4AF37;
}

/* Modal navigation buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 2em;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s;
    border-radius: 4px;
    user-select: none;
}

.modal-prev {
    left: 10px;
}

.modal-next {
    right: 10px;
}

.modal-nav:hover {
    background-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

#modalCaption {
    text-align: center;
    color: white;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile-first optimizations */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 15px;
        border-radius: 12px;
    }

    /* Hero section mobile - center text on small screens */
    .hero-content {
        text-align: center;
        padding-left: 20px;
        padding-right: 20px;
        margin: 0 auto;
    }

    .hero-description {
        max-width: 100%;
    }

    /* Mobile CTA button */
    .hero-cta-btn {
        margin-top: 25px;
        padding: 15px 30px;
        font-size: 1.1em;
        gap: 10px;
    }

    .cta-icon {
        font-size: 1.2em;
    }

    .cta-arrow {
        font-size: 1.1em;
    }

    header {
        margin-bottom: 25px;
    }

    header h1 {
        font-size: 2em;
        margin-bottom: 8px;
    }

    header p {
        font-size: 1em;
    }

    .stats {
        padding: 12px 20px;
        font-size: 1em;
    }

    #supporter-count {
        font-size: 1.2em;
    }

    /* Share section mobile styles - COMPACT */
    .share-page-section {
        margin: 15px 0 20px 0;
        padding: 12px;
        border-radius: 10px;
    }

    .share-page-section h3 {
        font-size: 1.1em;
        margin-bottom: 4px;
    }

    .share-subtitle {
        display: none; /* Hide subtitle on mobile to save space */
    }

    .share-buttons-grid {
        display: flex;
        gap: 6px;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding: 4px 0;
    }

    .share-btn {
        flex: 1 1 0;
        flex-direction: column;
        padding: 8px 4px;
        min-height: auto;
        min-width: 0;
        gap: 4px;
        font-size: 0.75em;
        border-radius: 8px;
    }

    .share-icon {
        font-size: 1.1em;
    }

    .share-label {
        font-size: 0.7em;
        line-height: 1.2;
    }

    .copy-success-msg {
        padding: 8px 12px;
        font-size: 0.85em;
        margin-top: 8px;
    }

    /* Leaderboard mobile styles */
    .regional-leaderboard {
        margin: 20px 0 30px 0;
        padding: 18px;
        border-radius: 12px;
    }

    .regional-leaderboard h3 {
        font-size: 1.5em;
        margin-bottom: 6px;
    }

    .leaderboard-subtitle {
        font-size: 0.95em;
        margin-bottom: 18px;
    }

    .leaderboard-list {
        gap: 10px;
    }

    .leaderboard-item {
        grid-template-columns: 45px 1fr 85px;
        padding: 12px;
        gap: 6px 10px;
    }

    .leaderboard-rank {
        font-size: 1.5em;
    }

    .leaderboard-first .leaderboard-rank {
        font-size: 1.8em;
    }

    .leaderboard-region {
        font-size: 1em;
    }

    .leaderboard-first .leaderboard-region {
        font-size: 1.1em;
    }

    .leaderboard-count {
        font-size: 0.85em;
    }

    .leaderboard-first .leaderboard-count {
        font-size: 0.9em;
    }

    .leaderboard-bar {
        height: 6px;
    }

    .leaderboard-percentage {
        font-size: 0.85em;
    }

    .leaderboard-first .leaderboard-percentage {
        font-size: 0.95em;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .input-group label {
        font-size: 1.1em;
    }

    .input-group input[type="text"],
    .input-group input[type="tel"],
    .input-group select {
        padding: 14px 18px;
        font-size: 16px; /* Prevents iOS zoom */
        max-width: 100%;
    }

    .input-group select {
        padding-right: 40px;
        background-size: 18px;
        background-position: right 12px center;
    }

    .upload-btn {
        width: 100%;
        padding: 16px 30px;
        font-size: 1.05em;
        min-height: 56px;
    }

    .mobile-hint {
        font-size: 0.85em;
        margin-top: 8px;
    }

    .canvas-section {
        margin: 25px 0;
    }

    #photo-canvas {
        border-radius: 8px;
    }

    .controls {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        min-height: 52px;
        font-size: 1em;
        padding: 14px 28px;
    }

    .avatars-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 15px 0;
    }

    /* .avatar-name removed - now using tooltip instead */
    /* .avatar-share-btn removed - gallery sharing feature removed */

    .btn-whatsapp {
        font-size: 1em;
        padding: 14px 28px;
    }

    .btn-whatsapp .whatsapp-icon {
        font-size: 1.1em;
    }

    /* Modal mobile optimizations */
    .modal.show {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 80vh;
    }

    .modal-content img {
        max-height: 75vh;
        border-radius: 6px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
        min-width: 48px;
        min-height: 48px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
    }

    #modalCaption {
        font-size: 0.95em;
        padding: 12px 8px;
    }

    /* Modal navigation mobile optimizations */
    .modal-nav {
        font-size: 1.5em;
        padding: 10px 15px;
        min-width: 48px;
        min-height: 48px;
    }

    .modal-prev {
        left: 5px;
    }

    .modal-next {
        right: 5px;
    }

    /* Loading and end messages */
    .loading-indicator {
        padding: 30px 15px;
    }

    .spinner {
        width: 40px;
        height: 40px;
        margin: 0 auto 15px;
    }

    .loading-indicator p {
        font-size: 1em;
    }

    .end-of-results {
        padding: 30px 15px;
        margin: 15px 0;
    }

    .end-of-results p {
        font-size: 1.1em;
        padding: 15px;
    }

    .message-box,
    .share-success {
        padding: 12px 20px;
        font-size: 0.95em;
    }

    /* Referral hint mobile styles */
    .referral-hint {
        margin-top: 20px;
        padding: 15px 10px;
    }

    .hint-content {
        padding: 12px 20px;
        gap: 10px;
    }

    .hint-icon {
        font-size: 1.3em;
    }

    .hint-text {
        font-size: 0.95em;
    }

    .hint-arrow {
        font-size: 1.2em;
    }
}

/* Very small screens (< 360px) */
@media (max-width: 359px) {
    header h1 {
        font-size: 1.6em;
    }

    .stats {
        font-size: 0.9em;
        padding: 10px 15px;
    }

    /* Even more compact share section */
    .share-page-section {
        margin: 10px 0 15px 0;
        padding: 10px;
    }

    .share-page-section h3 {
        font-size: 1em;
        margin-bottom: 3px;
    }

    .share-btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }

    .share-icon {
        font-size: 1em;
    }

    .avatars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* .avatar-share-btn removed - gallery sharing feature removed */
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content img {
        max-height: 70vh;
    }

    header {
        margin-bottom: 15px;
    }

    .canvas-section {
        margin: 15px 0;
    }
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6B7041 0%, #D4AF37 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #D4AF37 0%, #FCD116 100%);
}

.back-to-top-btn:active {
    transform: translateY(-2px);
}

/* Mobile optimization for back to top button */
@media (max-width: 600px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.5em;
    }
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Loading Spinner Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner-container {
    text-align: center;
    background: white;
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6B7041;
    border-right: 5px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #333;
    font-size: 1.3em;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.loading-subtext {
    color: #666;
    font-size: 1em;
    margin: 0;
}

/* Image Controls */
.canvas-hint {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.image-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

#zoom-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6B7041;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

#zoom-slider::-webkit-slider-thumb:hover {
    background: #D4AF37;
    transform: scale(1.1);
}

#zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6B7041;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.2s;
}

#zoom-slider::-moz-range-thumb:hover {
    background: #D4AF37;
    transform: scale(1.1);
}

.btn-icon {
    background: #6B7041;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #D4AF37;
    transform: rotate(180deg) scale(1.1);
}

.btn-icon:active {
    transform: rotate(180deg) scale(0.95);
}

#photo-canvas {
    cursor: grab;
}

#photo-canvas:active {
    cursor: grabbing;
}

@media (max-width: 600px) {
    .image-controls {
        flex-direction: column;
        gap: 10px;
    }

    .image-controls label {
        width: 100%;
    }

    #zoom-slider {
        width: 100%;
    }
}

/* ========== Referral Tracking Styles ========== */

/* Referral Section (shown after submission) */
.referral-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 2px solid #D4AF37;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.referral-section.show {
    opacity: 1;
    transform: translateY(0);
}

.referral-section h3 {
    color: #6B7041;
    font-size: 1.5em;
    margin-bottom: 8px;
    text-align: center;
}

.referral-subtitle {
    color: #666;
    font-size: 0.95em;
    text-align: center;
    margin-bottom: 20px;
}

.referral-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.referral-stat {
    text-align: center;
    padding: 15px 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #6B7041;
}

.referral-badge-display {
    font-size: 1.2em;
    padding: 8px 16px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4C1 100%);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3);
    display: inline-block;
}

.referral-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.referral-link-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-size: 0.9em;
    background: white;
    min-width: 200px;
}

.btn-referral-copy,
.btn-referral-share {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
}

.btn-referral-copy {
    background: #6B7041;
    color: white;
}

.btn-referral-copy:hover {
    background: #4a5129;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 112, 65, 0.3);
}

.btn-referral-share {
    background: #25D366;
    color: white;
}

.btn-referral-share:hover {
    background: #1fb855;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.competition-info {
    background: linear-gradient(135deg, #FCD116 0%, #D4AF37 100%);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.competition-info h4 {
    color: #2C3E1F;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
}

.competition-desc {
    color: #2C3E1F;
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: center;
}

.competition-note {
    background: rgba(255, 255, 255, 0.3);
    padding: 8px;
    border-radius: 6px;
    color: #2C3E1F;
    font-size: 0.85em;
    text-align: center;
    margin-top: 8px;
}

/* Past Winners Section */
.past-winners-section {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.past-winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.winner-card {
    background: linear-gradient(135deg, #FCD116 0%, #D4AF37 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.winner-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}

.winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.winner-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.winner-info {
    flex: 1;
}

.winner-info h4 {
    color: #2C3E1F;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.winner-period {
    color: #6B7041;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.winner-count {
    color: #2C3E1F;
    font-size: 0.9em;
    font-weight: 600;
}

.winner-trophy {
    font-size: 35px;
    flex-shrink: 0;
}

/* Daily Leaderboard */
.daily-leaderboard {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.daily-leaderboard .section-title {
    color: #6B7041;
    font-size: 1.5em;
    margin-bottom: 8px;
    text-align: center;
}

.leaderboard-table {
    overflow-x: auto;
    margin-top: 15px;
}

.referral-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.referral-leaderboard-table thead {
    background: linear-gradient(135deg, #6B7041 0%, #4a5129 100%);
    color: white;
}

.referral-leaderboard-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}

.referral-leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.referral-leaderboard-table tbody tr {
    transition: all 0.3s;
}

.referral-leaderboard-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.rank-first {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4d9 100%);
}

.rank-second {
    background: linear-gradient(135deg, #f0f0f0 0%, #e6e6e6 100%);
}

.rank-third {
    background: linear-gradient(135deg, #ffe8d6 0%, #ffd9b3 100%);
}

.rank-cell {
    font-size: 1.3em;
    text-align: center;
    font-weight: bold;
    width: 60px;
}

.name-cell {
    font-weight: 600;
    color: #333;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D4AF37;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.leaderboard-avatar-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    border: 2px solid #ccc;
}

.region-cell {
    color: #666;
    font-size: 0.9em;
}

.count-cell {
    font-weight: bold;
    color: #6B7041;
    text-align: center;
}

.badge-cell {
    font-size: 0.85em;
    text-align: center;
}

.leaderboard-note {
    text-align: center;
    color: #888;
    font-size: 0.85em;
    margin-top: 15px;
    font-style: italic;
}

/* Weekly Winners */
.weekly-winners {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.weekly-winners .section-title {
    color: #6B7041;
    font-size: 1.5em;
    margin-bottom: 8px;
    text-align: center;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.winner-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4d9 100%);
    border: 2px solid #D4AF37;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.winner-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.winner-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.winner-region {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.winner-period {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 8px;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    display: inline-block;
}

.winner-count {
    font-size: 1.1em;
    font-weight: bold;
    color: #6B7041;
    margin-top: 8px;
}

/* Check My Stats Section */
.check-stats-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.btn-check-stats {
    display: inline-block;
    background: linear-gradient(135deg, #6B7041 0%, #5A5E35 100%);
    color: white;
    padding: 18px 35px;
    min-height: 56px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    border: none;
}

.btn-check-stats:active {
    transform: scale(0.98);
}

.btn-check-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 112, 65, 0.5);
}

/* Mobile specific styles for stats button */
@media (max-width: 768px) {
    .btn-check-stats {
        width: 100%;
        padding: 16px 30px;
        font-size: 1.05em;
        min-height: 56px;
    }

    .check-stats-section {
        margin: 20px 0;
        padding: 15px;
    }
}

/* Stats Modal Styles */
.stats-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: auto;
    animation: zoomIn 0.3s;
}

.stats-modal-content .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #333;
    font-size: 35px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
}

.stats-modal-content .modal-close:hover {
    color: #D4AF37;
}

.stats-modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding-right: 40px; /* Make room for close button */
}

.stats-phone-form {
    padding: 20px 0;
}

.stats-phone-form p {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.stats-error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    border-left: 4px solid #c62828;
}

.stats-display {
    padding: 20px 0;
    animation: fadeIn 0.5s;
}

.stats-welcome {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7f0 0%, #e8ede0 100%);
    border-radius: 12px;
}

.stats-welcome h3 {
    color: #6B7041;
    margin: 0;
}

/* Responsive styles for referral components */
@media (max-width: 600px) {
    .referral-stats {
        flex-direction: column;
        gap: 15px;
    }

    .referral-link-container {
        flex-direction: column;
    }

    .referral-link-input {
        width: 100%;
    }

    .btn-referral-copy,
    .btn-referral-share {
        width: 100%;
    }

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

    .referral-leaderboard-table {
        font-size: 0.85em;
    }

    .referral-leaderboard-table th,
    .referral-leaderboard-table td {
        padding: 8px 4px;
    }

    .leaderboard-avatar,
    .leaderboard-avatar-placeholder {
        width: 28px;
        height: 28px;
    }

    .leaderboard-user {
        gap: 6px;
    }

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

    .stats-modal-content {
        max-width: 95%;
        padding: 20px;
    }
}
