/* ============================================
   REPUTATION PAGE - DESIGN MODERNO E ELEGANTE
   Cores verdes do Jerbs (#00c853)
   ============================================ */

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

body {
    background: #0a0a0f;
    color: #ffffff;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ============================
   BACKGROUND EFFECTS
   ============================ */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
    z-index: -1;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 200, 83, 0.5) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    animation: blobFloat 18s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.3) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: blobFloat 22s ease-in-out infinite reverse;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -40px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

/* ============================
   LOGIN OVERLAY
   ============================ */
#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

#loginOverlay .overlay-content {
    background: linear-gradient(135deg, #1a1a24, #12121a);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 420px;
    border: 2px solid rgba(0, 200, 83, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: overlaySlideIn 0.5s ease;
}

@keyframes overlaySlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.overlay-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(0, 200, 83, 0.5));
}

#loginOverlay h2 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

#loginOverlay p {
    color: #a0a0b0;
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

#loginOverlay button {
    background: linear-gradient(135deg, #00c853, #00a743);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(0, 200, 83, 0.4);
}

#loginOverlay button:hover {
    background: linear-gradient(135deg, #00e676, #00c853);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 200, 83, 0.5);
}

/* ============================
   MAIN CONTAINER
   ============================ */
.reputation-main {
    padding-top: 80px;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* ============================
   HERO SECTION - HEADER VERDE
   Estilo Jerbs
   ============================ */
.rep-hero {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.hero-header-bar {
    position: relative;
    background: linear-gradient(135deg, #00c853 0%, #00a743 50%, #00c853 100%);
    border-radius: 20px 20px 8px 8px;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(0, 200, 83, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-header-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    pointer-events: none;
}

.hero-header-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #008f3d, #00c853, #008f3d);
}

.header-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.header-username {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-avatar {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    background: #1a1a24;
}

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

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 200, 83, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* ============================
   PAINEL PRINCIPAL
   ============================ */
.rep-panel {
    padding: 2rem 1rem 4rem;
}

.panel-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================
   CARD DE ESTATÍSTICAS
   ============================ */
.stats-card {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.9), rgba(18, 18, 26, 0.95));
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border: 1px solid rgba(0, 200, 83, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stats-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stats-label {
    font-size: 0.85rem;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00e676;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

/* ============================
   CARD PRINCIPAL DE DAR REP
   ============================ */
.give-rep-card {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.95), rgba(15, 15, 22, 0.98));
    border-radius: 30px;
    border: 1px solid rgba(0, 200, 83, 0.25);
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.card-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 200, 83, 0.5) 20%,
            #00c853 50%,
            rgba(0, 200, 83, 0.5) 80%,
            transparent 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 2rem 1rem;
}

.header-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 15px rgba(0, 200, 83, 0.5));
}

.header-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.header-text p {
    font-size: 0.9rem;
    color: #8888a0;
}

.card-body {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Preview do Target */
.target-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 200, 83, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(0, 200, 83, 0.15);
    width: 100%;
    max-width: 300px;
}

.preview-avatar {
    position: relative;
    width: 100px;
    height: 100px;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 200, 83, 0.4);
}

.avatar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #00c853;
    animation: ringRotate 2s linear infinite;
}

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

.preview-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.preview-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
}

.preview-id {
    font-size: 0.8rem;
    color: #7777a0;
    font-family: monospace;
}

/* Cooldown Info */
.cooldown-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 165, 0, 0.15);
    border-radius: 15px;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.cooldown-icon {
    font-size: 1.2rem;
}

.cooldown-text {
    font-size: 0.9rem;
    color: #ffaa00;
    font-weight: 500;
}

/* Botão de Dar Rep */
.give-rep-btn {
    position: relative;
    background: linear-gradient(135deg, #00c853, #00a743);
    color: #000;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 25px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 15px 40px rgba(0, 200, 83, 0.4);
    overflow: hidden;
}

.give-rep-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #00e676, #00c853);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 200, 83, 0.5);
}

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

.give-rep-btn .btn-emoji {
    font-size: 1.3rem;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
}

.give-rep-btn:not(:disabled):hover .btn-glow {
    left: 100%;
}

/* Result Message */
.result-message {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.8rem;
    border-radius: 15px;
    font-weight: 500;
    animation: resultSlideIn 0.4s ease;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.result-message.success {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #00c853;
}

.result-message.error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.result-icon {
    font-size: 1.2rem;
}

.card-footer {
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-note {
    font-size: 0.85rem;
    color: #68a080;
}

/* ============================
   HISTÓRICO DE REPUTAÇÕES
   ============================ */
.history-card {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.9), rgba(18, 18, 26, 0.95));
    border-radius: 25px;
    border: 1px solid rgba(0, 200, 83, 0.15);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.history-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.history-list {
    padding: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: #8888a0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 200, 83, 0.2);
    border-top-color: #00c853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(0, 200, 83, 0.08);
}

.history-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 200, 83, 0.3);
}

.history-info {
    flex: 1;
}

.history-name {
    display: block;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.history-date {
    display: block;
    font-size: 0.8rem;
    color: #7777a0;
    margin-top: 0.2rem;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: #68a080;
}

.history-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ============================
   AD CONTAINER
   ============================ */
.ad-container {
    background: rgba(26, 26, 36, 0.5);
    border-radius: 20px;
    padding: 1rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================
   FOOTER
   ============================ */
.rep-footer {
    position: relative;
    background: linear-gradient(180deg, transparent, #0a0a0f);
    padding-top: 4rem;
}

.footer-curve {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: radial-gradient(ellipse 100% 200% at 50% 100%, rgba(0, 200, 83, 0.1) 0%, transparent 60%);
}

.footer-content {
    text-align: center;
    padding: 2rem 1rem 3rem;
}

.footer-content p {
    color: #68a080;
    margin-bottom: 0.5rem;
}

.footer-content .highlight {
    color: #00c853;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.footer-links a {
    color: #88a098;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #00c853;
}

/* ============================
   RESPONSIVIDADE
   ============================ */
@media (max-width: 768px) {
    .reputation-main {
        padding-top: 70px;
        overflow-x: hidden;
    }

    .rep-hero {
        padding: 0 0.8rem;
        max-width: 100%;
    }

    .hero-header-bar {
        padding: 1.5rem 1rem;
        border-radius: 16px 16px 6px 6px;
    }

    .header-username {
        font-size: 1.6rem;
        max-width: 55%;
        word-break: break-word;
    }

    .header-avatar {
        width: 65px;
        height: 65px;
        right: 1rem;
    }

    .rep-panel {
        padding: 1.5rem 0.8rem 3rem;
    }

    .panel-container {
        max-width: 100%;
        gap: 1rem;
    }

    .stats-card {
        padding: 1rem 1.2rem;
        border-radius: 16px;
    }

    .stats-value {
        font-size: 1.5rem;
    }

    .give-rep-card {
        border-radius: 20px;
    }

    .card-header {
        padding: 1.2rem 1.2rem 0.8rem;
        gap: 0.8rem;
    }

    .header-icon {
        font-size: 1.8rem;
    }

    .header-text h2 {
        font-size: 1.3rem;
    }

    .card-body {
        padding: 1rem 1.2rem 1.5rem;
    }

    .give-rep-btn {
        padding: 1rem 1.8rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .target-preview {
        padding: 1rem;
        max-width: 100%;
    }

    .preview-avatar {
        width: 75px;
        height: 75px;
    }

    .cooldown-info {
        padding: 0.7rem 1rem;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cooldown-text {
        font-size: 0.85rem;
    }

    .result-message {
        padding: 0.8rem 1.2rem;
        width: 100%;
        justify-content: center;
    }

    .card-footer {
        padding: 0.8rem 1.2rem;
    }

    .footer-note {
        font-size: 0.8rem;
    }

    .history-card {
        border-radius: 20px;
    }

    .history-header {
        padding: 1.2rem 1rem;
    }

    .history-header h3 {
        font-size: 1rem;
    }

    .history-list {
        padding: 0.8rem;
    }

    .history-item {
        padding: 0.8rem;
    }

    .history-avatar {
        width: 40px;
        height: 40px;
    }

    .ad-container {
        border-radius: 16px;
        padding: 0.8rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .rep-footer {
        padding-top: 3rem;
    }

    .footer-content {
        padding: 1.5rem 1rem 2rem;
    }

    #loginOverlay .overlay-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
        max-width: calc(100% - 2rem);
    }

    #loginOverlay h2 {
        font-size: 1.3rem;
    }

    #loginOverlay p {
        font-size: 0.9rem;
    }

    #loginOverlay button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .reputation-main {
        padding-top: 65px;
    }

    .rep-hero {
        padding: 0 0.5rem;
    }

    .hero-header-bar {
        padding: 1.2rem 0.8rem;
    }

    .header-label {
        font-size: 0.65rem;
    }

    .header-username {
        font-size: 1.3rem;
        max-width: 50%;
    }

    .header-avatar {
        width: 50px;
        height: 50px;
        right: 0.8rem;
    }

    .rep-panel {
        padding: 1rem 0.5rem 2.5rem;
    }

    .stats-card {
        padding: 0.9rem 1rem;
        gap: 0.8rem;
    }

    .stats-icon {
        font-size: 1.8rem;
    }

    .stats-label {
        font-size: 0.75rem;
    }

    .stats-value {
        font-size: 1.3rem;
    }

    .card-header {
        padding: 1rem 1rem 0.6rem;
    }

    .header-text h2 {
        font-size: 1.2rem;
    }

    .header-text p {
        font-size: 0.8rem;
    }

    .card-body {
        padding: 0.8rem 1rem 1.2rem;
        gap: 1rem;
    }

    .preview-avatar {
        width: 65px;
        height: 65px;
    }

    .preview-name {
        font-size: 1rem;
    }

    .preview-id {
        font-size: 0.7rem;
    }

    .give-rep-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    .history-header h3 {
        font-size: 0.95rem;
    }

    .history-name {
        font-size: 0.9rem;
    }

    .history-date {
        font-size: 0.75rem;
    }
}

/* Scrollbar Styling */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 200, 83, 0.4);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 200, 83, 0.6);
}