/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* make the underlay black and fill the viewport */
html, body {
    background:#000;
    margin:0;
    height:100%;
    min-height:100svh; /* handles iOS dynamic toolbars */
  }
  
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000000;
    background: #000000;
    color: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: hidden;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

.container {
    width: 100%;
}

/* Join Page Styles */
.join-page {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.halloween-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #FF6B35, #FFD93D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.5));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(255, 107, 53, 1));
    }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #FFD93D;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.name-input {
    padding: 20px;
    font-size: 1.5rem;
    border: 3px solid #9D4EDD;
    border-radius: 15px;
    background: rgba(157, 78, 221, 0.1);
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: #FF6B35;
    background: rgba(157, 78, 221, 0.2);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-large {
    padding: 25px 50px;
    font-size: 1.6rem;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35, #FF8C61);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #9D4EDD, #C77DFF);
    color: white;
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(157, 78, 221, 0.6);
}

/* Counter Page Styles */
.counter-page {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.user-header {
    margin-bottom: 40px;
}

.user-name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #FFD93D;
}

.counter-display {
    margin: 50px 0;
    padding: 40px;
    background: rgba(157, 78, 221, 0.2);
    border-radius: 20px;
    border: 3px solid #9D4EDD;
}

.count-label {
    font-size: 1.5rem;
    color: #FFD93D;
    margin-bottom: 20px;
}

.count-number {
    font-size: 6rem;
    font-weight: bold;
    color: #FF6B35;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    transition: all 0.3s ease;
}

.count-number.pulse {
    transform: scale(1.2);
    filter: drop-shadow(0 0 40px rgba(255, 107, 53, 1));
}

.button-group {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 40px 0;
}

.btn-counter {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid;
    font-size: 4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.btn-plus {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.1));
}

.btn-plus:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.8);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.5), rgba(78, 205, 196, 0.3));
}

.btn-minus {
    border-color: #FF6B35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 107, 53, 0.1));
}

.btn-minus:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.5), rgba(255, 107, 53, 0.3));
}

.btn-icon {
    color: white;
    font-weight: bold;
}

/* Leaderboard Page Styles */
.leaderboard-page {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.leaderboard-header-small {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 20px;
}

.halloween-title-small {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #FF6B35, #FFD93D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.pumpkin, .spider {
    font-size: 3.8rem;
    animation: float 3s ease-in-out infinite;
}

.pumpkin {
    animation-delay: 0s;
}

.spider {
    animation-delay: 1.5s;
}

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

.leaderboard-container-large {
    flex: 1;
    margin: 20px;
    padding: 20px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 20px;
    border: 2px solid #9D4EDD;
    overflow-y: auto;
}

.leaderboard-bar {
    margin-bottom: 25px;
    animation: slideIn 0.5s ease-out;
}

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


.bar-name {
    font-weight: bold;
    color: #ffffff;
}

.bar-count {
    font-weight: bold;
    color: #ffffff;
    padding-left: 10px;
}

.bar-container {
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #ee6204;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    animation: fillAnimation 1s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

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

/* QR Code Section */
.qr-code-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin-left: auto;
}

.qr-code {
    width: 120px;
    height: 120px;
    border: 3px solid #FF6B35;
    border-radius: 10px;
    background: white;
    padding: 5px;
}

.qr-text {
    margin-top: 10px;
    font-size: 1rem;
    color: #FFD93D;
    font-weight: bold;
}

/* Utility Styles */
.nav-buttons {
    margin-top: 30px;
}

.loading {
    font-size: 1.5rem;
    color: #FFD93D;
    padding: 40px;
}

.no-data, .error {
    font-size: 1.3rem;
    color: #FF6B35;
    padding: 40px;
}

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

/* Responsive Design */
@media (max-width: 600px) {
    .halloween-title {
        font-size: 2.5rem;
    }
    
    .user-name {
        font-size: 2rem;
    }
    
    .count-number {
        font-size: 4rem;
    }
    
    .btn-counter {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .button-group {
        gap: 20px;
    }
    
    .pumpkin, .spider {
        font-size: 1.2rem;
    }
    
    .halloween-title-small {
        font-size: 1.5rem;
    }
    
    .leaderboard-header-small {
        gap: 4px;
        padding: 0 10px;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
}

.leaderboard-container-large {
    display: flex;
    flex-direction: column;
  }

  
  