/* styles.css */
:root {
    --primary: #5046e5;
    --primary-dark: #3934a3;
    --primary-light: #7b70fa;
    --secondary: #ff3e6c;
    --secondary-light: #ff6b8e;
    --text: #ffffff;
    --text-dark: #e0e0e0;
    --background: #0e0b30;
    --background-light: #191650;
    --card-bg: rgba(30, 27, 75, 0.7);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    --glow: 0 0 15px rgba(123, 112, 250, 0.6);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-stroke: rgba(255, 255, 255, 0.1);
    --success: #00c853;
    --warning: #ffc107;
    --card-radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--background), var(--background-light));
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Particles Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.selected-language {
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-stroke);
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-language:hover {
    background: rgba(255, 255, 255, 0.1);
}

.selected-language img {
    width: 20px;
    height: auto;
    margin-right: 10px;
}

.selected-language i {
    margin-left: 10px;
    font-size: 12px;
}

.language-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-stroke);
    border-radius: 15px;
    width: 150px;
    overflow: hidden;
    display: none;
    box-shadow: var(--shadow);
}

.language-selector:hover .language-dropdown {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option.active {
    background: var(--primary);
}

.lang-option img {
    width: 20px;
    height: auto;
    margin-right: 10px;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.glow-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(80, 70, 229, 0.7);
    margin-bottom: 30px;
}

.highlight {
    color: var(--secondary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

.user-location {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.location-pulse {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--secondary);
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
    animation: pulsate 2s infinite;
}

@keyframes pulsate {
    0% {
        transform: translateY(-50%) scale(0.6);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0;
    }
}

.location-info {
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-stroke);
    border-radius: 50px;
    padding: 12px 30px 12px 70px;
    box-shadow: var(--shadow);
}

.location-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    left: 10px;
    box-shadow: 0 0 15px rgba(255, 62, 108, 0.5);
}

.location-text {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 50px;
}

/* World Map */
.world-map-container {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    min-height: 500px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-stroke);
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(14, 11, 48, 0) 0%, rgba(14, 11, 48, 0.4) 100%);
    pointer-events: none;
    z-index: 2;
}

#world-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.imgur.com/bQw5SIj.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.country-stats-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 3;
}

.country-stats-content {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--card-radius);
    padding: 15px 25px;
    box-shadow: var(--shadow);
}

.country-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#country-rank-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.click-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

#click-button {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    cursor: pointer;
}

.click-ripples {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.main-button {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(80, 70, 229, 0.5), inset 0 -5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease-out;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.main-button::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 60%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    pointer-events: none;
}

#click-button:active .main-button {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(80, 70, 229, 0.3), inset 0 -3px 10px rgba(0, 0, 0, 0.4);
}

.click-effect {
    position: absolute;
    font-size: 1.2rem;
    color: var(--secondary);
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
}

.boost-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

#boost-button {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary), #ff1f54);
    border: none;
    color: white;
    padding: 0;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(255, 62, 108, 0.4);
    transition: all 0.3s ease;
}

#boost-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 62, 108, 0.5);
}

#boost-button:disabled {
    background: linear-gradient(135deg, #585858, #3d3d3d);
    cursor: not-allowed;
    box-shadow: none;
}

.boost-icon {
    background: rgba(0, 0, 0, 0.2);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.boost-text {
    padding: 0 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.boost-timer {
    margin-left: 10px;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--card-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 20px;
}

.stat-card.personal .stat-icon {
    background: linear-gradient(135deg, #7b70fa, #5046e5);
    box-shadow: 0 5px 15px rgba(123, 112, 250, 0.3);
}

.stat-card.city .stat-icon {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    box-shadow: 0 5px 15px rgba(0, 198, 255, 0.3);
}

.stat-card.country .stat-icon {
    background: linear-gradient(135deg, #ff3e6c, #ff8e53);
    box-shadow: 0 5px 15px rgba(255, 62, 108, 0.3);
}

.stat-info {
    flex-grow: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Rankings Section */
.rankings-section {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--glass-stroke);
    margin-bottom: 50px;
}

.ranking-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
}

.ranking-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.ranking-tab i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.ranking-tab.active {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 3px solid var(--primary);
}

.ranking-display {
    padding: 30px;
}

.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.ranking-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.ranking-filters {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    padding: 5px;
}

.filter-button {
    background: none;
    border: none;
    color: var(--text);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-button.active {
    background: var(--primary);
}

.ranking-table-container {
    overflow: hidden;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.1);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table-header {
    display: flex;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-stroke);
}

.rank-column {
    width: 60px;
    text-align: center;
}

.name-column {
    flex-grow: 1;
}

.clicks-column {
    width: 120px;
    text-align: right;
}

.ranking-table-body {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) rgba(0, 0, 0, 0.2);
}

.ranking-table-body::-webkit-scrollbar {
    width: 6px;
}

.ranking-table-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.ranking-table-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 3px;
}

.ranking-row {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    align-items: center;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ranking-row.user-row {
    background: rgba(80, 70, 229, 0.15);
}

.ranking-row .rank {
    width: 60px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.ranking-row .rank span {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: var(--primary);
    border-radius: 50%;
    font-size: 0.9rem;
}

.ranking-row.top-1 .rank span {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ranking-row.top-2 .rank span {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.ranking-row.top-3 .rank span {
    background: linear-gradient(135deg, #cd7f32, #a05a2c);
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.ranking-row .name {
    flex-grow: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.ranking-row .name img {
    width: 20px;
    margin-right: 10px;
    border-radius: 3px;
}

.ranking-row .clicks {
    width: 120px;
    text-align: right;
    font-weight: 700;
    color: var(--primary-light);
}

/* Share Profile */
.share-profile {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-stroke);
}

.share-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-link-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 5px;
    flex-grow: 1;
    max-width: 400px;
}

#user-profile-link {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 10px 20px;
    font-size: 1rem;
    outline: none;
}

.copy-button {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: var(--primary-light);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-stroke);
    border-radius: 50%;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-dark);
    border-top: 1px solid var(--glass-stroke);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    0% { transform: scale(0.1); opacity: 1; }
    70% { transform: scale(3); opacity: 0.7; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes clickFeedback {
    0% { transform: translateY(0px); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .world-map-container {
        min-height: 400px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .glow-text {
        font-size: 2.5rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .ranking-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .social-icons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .main-container {
        padding: 60px 15px 30px;
    }
    
    .glow-text {
        font-size: 2rem;
    }
    
    .ranking-display {
        padding: 20px 15px;
    }
    
    .ranking-tab {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
    
    .ranking-tab i {
        margin-right: 5px;
    }
}