@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #0c0a09;
    --card-bg: #1c1917;
    --primary-color: #f59e0b;
    --text-color: #ffffff;
    --text-muted: #a8a29e;
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 90px;
    /* Yuxarıdan 95px boşluq */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    position: relative;
    background: radial-gradient(circle at top right, #332100 0%, #0c0a09 100%);
}

header {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

#profile-trigger:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

#user-photo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

#user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 4px;
    transition: transform 0.3s;
}

.user-profile.active .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-menu-container {
    position: absolute;
    top: 150px;
    /* Profilin altından başlayacaq */
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 200px;
    background: rgba(28, 25, 23, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.profile-menu-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    font-size: 1.2rem;
}

.balance-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.balance-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0px;
}

#coin-count {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
    margin-top: -5px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Start from top of main area */
    margin-top: 20px;
}

.coin-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.coin-container {
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.coin-container:active {
    transform: scale(0.95);
}

#coin-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #ffffff;
    /* Şəffaf yerləri ağ rənglə doldurur */
    border-radius: 50%;
    /* Dairəvi formanı qoruyur */
}

.click-hint {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    opacity: 0.8;
    animation: pulse 2s infinite ease-in-out;
    margin-top: 20px;
}

/* Energy Bar */
.energy-container {
    width: 100%;
    max-width: 300px;
    margin-top: 1.5rem;
}

.energy-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 8px;
}

.energy-fill {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 50px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.energy-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.energy-icon {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.plus-one {
    position: absolute;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    pointer-events: none;
    animation: floatUp 0.8s ease-out forwards;
    z-index: 100;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) scale(1.2);
    }
}

.coin-wrapper::after {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

/* Sub Page Overlay */
.sub-page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    padding: 95px 1.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-page-overlay.show {
    transform: translateX(0);
}

.sub-page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.back-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

#page-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.sub-page-content {
    flex: 1;
    overflow-y: auto;
}

/* Ranking List */
.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 8px;
}

.rank-num {
    font-weight: 800;
    color: var(--primary-color);
    width: 25px;
}

.rank-name {
    flex: 1;
    font-weight: 500;
}

.rank-clicks {
    font-weight: 700;
    color: var(--text-muted);
}

/* Friends Page */
.referral-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
}

.ref-link-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

#ref-link {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

#copy-ref-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 0 15px;
    border-radius: 10px;
    font-weight: 600;
}

.main-btn {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* Tasks & Rules */
.rules-card,
.task-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    line-height: 1.6;
}

.task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 15px;
    border-radius: 8px;
}

/* Lang Selection */
.lang-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.lang-item:active {
    background: rgba(255, 255, 255, 0.1);
}