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

html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #87CEEB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding-top: max(env(safe-area-inset-top), 32px);
    padding-right: max(env(safe-area-inset-right), 24px);
    padding-bottom: max(env(safe-area-inset-bottom), 32px);
    padding-left: max(env(safe-area-inset-left), 24px);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    background: #87CEEB;
    -webkit-overflow-scrolling: touch;
}

/* Background Liquid Glass */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    margin: 0;
    padding: 0;
}

.liquid-glass-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #87CEEB 100%);
    overflow: hidden;
}

.liquid-glass-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(135, 206, 235, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 165, 0, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(176, 224, 230, 0.35) 0%, transparent 50%),
                radial-gradient(circle at 20% 70%, rgba(255, 140, 0, 0.25) 0%, transparent 45%);
    animation: liquidMove 20s ease-in-out infinite;
    border-radius: 50%;
    filter: blur(60px);
}

.liquid-glass-bg::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle at 60% 50%, rgba(135, 206, 235, 0.35) 0%, transparent 50%),
                radial-gradient(circle at 40% 70%, rgba(255, 165, 0, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 30%, rgba(255, 140, 0, 0.25) 0%, transparent 45%);
    animation: liquidMove 15s ease-in-out infinite reverse;
    border-radius: 50%;
    filter: blur(60px);
}

@keyframes liquidMove {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(5%, 5%) rotate(5deg);
    }
    66% {
        transform: translate(-5%, 3%) rotate(-5deg);
    }
}

/* Neon Lines */
.neon-line {
    position: absolute;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 140, 0, 0.8) 20%, rgba(255, 165, 0, 1) 50%, rgba(255, 140, 0, 0.8) 80%, transparent 100%);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6),
                0 0 40px rgba(255, 165, 0, 0.4),
                0 0 60px rgba(255, 140, 0, 0.3);
    z-index: 1;
    animation: neonPulse 3s ease-in-out infinite;
}

.neon-line-1 {
    top: 20%;
    left: -10%;
    width: 120%;
    height: 2px;
    transform: rotate(-5deg);
    animation-delay: 0s;
}

.neon-line-2 {
    top: 50%;
    left: -15%;
    width: 130%;
    height: 2px;
    transform: rotate(3deg);
    animation-delay: 1s;
}

.neon-line-3 {
    top: 75%;
    left: -10%;
    width: 120%;
    height: 2px;
    transform: rotate(-2deg);
    animation-delay: 2s;
}

.neon-line-4 {
    top: 35%;
    left: -5%;
    width: 110%;
    height: 2px;
    transform: rotate(4deg);
    animation-delay: 1.5s;
    opacity: 0.7;
}

@keyframes neonPulse {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(255, 140, 0, 0.6),
                    0 0 40px rgba(255, 165, 0, 0.4),
                    0 0 60px rgba(255, 140, 0, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 30px rgba(255, 140, 0, 0.8),
                    0 0 60px rgba(255, 165, 0, 0.6),
                    0 0 90px rgba(255, 140, 0, 0.5);
    }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    max-width: 448px;
    z-index: 10;
    position: relative;
}

/* App Name */
.app-name {
    font-size: 68px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-align: center;
}

.top-text {
    color: #ffffff;
}

.spin-text {
    color: #fb923c;
}

.orange-text {
    color: #fb923c;
}

/* Tagline */
.tagline {
    color: #000000;
    text-align: center;
    font-size: 14px;
    margin-bottom: 32px;
    max-width: 320px;
    font-weight: 500;
}

/* Buttons Container */
.buttons-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn.primary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.download-btn.primary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.download-btn.primary:active {
    transform: scale(0.96);
    transition: transform 0.1s cubic-bezier(.4,0,.2,1);
}

.download-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.download-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.download-btn.secondary:active {
    transform: scale(0.96);
    transition: transform 0.1s cubic-bezier(.4,0,.2,1);
}

.btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Benefits */
.benefits-container {
    margin-top: 40px;
    width: 100%;
}

.benefits-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    animation: heartbeat 2s ease-in-out infinite;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.benefit-item:not(:last-child) {
    margin-bottom: 16px;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.orange-gradient {
    background: linear-gradient(to bottom right, #fb923c, #f97316);
}

.blue-gradient {
    background: linear-gradient(to bottom right, #60a5fa, #2563eb);
}

.lime-gradient {
    background: linear-gradient(to bottom right, #a3e635, #84cc16);
}

.benefit-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

/* Footer */
.footer {
    width: 100%;
    max-width: 448px;
    z-index: 10;
    position: relative;
    margin-top: 24px;
}

.copyright {
    text-align: center;
    color: rgba(96, 165, 250, 0.4);
    font-size: 12px;
    margin-top: 16px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-7 {
    animation-delay: 0.7s;
}

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

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10% {
        transform: scale(1.02);
    }
    20% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.02);
    }
    40% {
        transform: scale(1);
    }
}

/* Ranking Page Styles */
.ranking-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    z-index: 10;
    position: relative;
    padding: 20px 0;
}

.ranking-header {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.ranking-title {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.ranking-subtitle {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 12px;
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 32px;
    width: 100%;
    padding: 0 16px;
}

.podium-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    flex: 1;
    max-width: 180px;
    animation: heartbeat 2s ease-in-out infinite;
}

.podium-1 {
    order: 2;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(255, 140, 0, 0.3);
}

.podium-2 {
    order: 1;
}

.podium-3 {
    order: 3;
}

.podium-crown {
    font-size: 24px;
    margin-bottom: 4px;
}

.podium-rank {
    font-size: 48px;
    font-weight: 800;
    color: #fb923c;
    margin-bottom: 12px;
}

.podium-1 .podium-rank {
    color: #ffd700;
}

.podium-avatar {
    font-size: 40px;
    margin-bottom: 8px;
}

.podium-name {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-points {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.podium-crown {
    font-size: 32px;
    margin-bottom: 8px;
}

.ranking-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.ranking-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.rank-number {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
    text-align: center;
}

.rank-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-name {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.rank-details {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.rank-points {
    font-size: 24px;
    font-weight: 700;
    color: #fb923c;
    white-space: nowrap;
}

/* Loading and Error States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: white;
    min-height: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fb923c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

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

.loading-state p {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.error-state {
    padding: 60px 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    margin: 20px 24px;
}

.error-state p {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.no-data-message {
    padding: 80px 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.no-data-message p {
    font-size: 32px;
    font-weight: 600;
}

.ranking-footer {
    margin-top: 32px;
    width: 100%;
    padding: 0 16px;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
}

.back-button:active {
    transform: scale(0.96) translateX(-4px);
    transition: transform 0.1s cubic-bezier(.4,0,.2,1);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* Avatar Images */
.podium-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.podium-avatar {
    font-size: 60px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

/* Android Warning Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(251, 146, 60, 0.3);
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fb923c;
    margin-bottom: 20px;
    text-align: center;
}

.modal-text {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    text-align: left;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 150px;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn-continue {
    background: #fb923c;
    color: white;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

.modal-btn-continue:hover {
    background: #f97316;
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.4);
    transform: translateY(-2px);
}

.modal-btn:active {
    transform: scale(0.96);
    transition: transform 0.1s cubic-bezier(.4,0,.2,1);
}

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

/* Responsive */
@media (min-width: 768px) {
    .app-name {
        font-size: 76px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .download-btn {
        padding: 18px 28px;
        font-size: 20px;
    }

    .ranking-title {
        font-size: 80px;
    }

    .ranking-subtitle {
        font-size: 36px;
    }
    
    .loading-state p {
        font-size: 32px;
    }
    
    .error-state p {
        font-size: 40px;
    }
    
    .no-data-message p {
        font-size: 40px;
    }

    .podium-container {
        gap: 20px;
        padding: 0 24px;
    }

    .podium-item {
        padding: 20px 16px;
        max-width: 150px;
    }

    .ranking-items {
        padding: 0 24px;
    }
}