:root {
    --background-color: #1c1917;
    --text-color: #fff0df;
    --accent-color: #fb923c;
    --accent-light: #fed7aa;
    --accent-dark: #ea580c;
    --border-color: rgba(255, 240, 223, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-color: rgba(255, 240, 223, 0.05);
    --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --card-bg: rgba(255, 255, 255, 0.03);
    --header-bg: rgba(28, 25, 23, 0.8);
}

html[data-theme="light"] {
    --background-color: #FEF1DF;
    --text-color: #1c1917;
    --border-color: rgba(28, 25, 23, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: rgba(28, 25, 23, 0.05);
    --card-bg: rgba(0, 0, 0, 0.03);
    --header-bg: rgba(254, 241, 223, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
    transition: background-color 0.35s var(--animation-timing),
                color 0.35s var(--animation-timing),
                border-color 0.35s var(--animation-timing);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Fade animation */
    opacity: 0;
    transition: opacity .35s ease;
}

body.fade-ready {
    opacity: 1;
}

::selection {
    background-color: rgba(255, 240, 223, 0.1);
}

html[data-theme="light"] ::selection {
    background-color: rgba(28, 25, 23, 0.1);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    z-index: 50;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

header.scrolled {
    background-color: var(--header-bg);
    box-shadow: 0 5px 20px var(--shadow-color);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s var(--animation-timing);
}

.theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

html[data-theme="light"] .theme-toggle {
    background-color: rgba(0, 0, 0, 0.03);
    color: rgba(28, 25, 23, 0.8);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .moon-icon {
    display: block;
}

.theme-toggle .sun-icon {
    display: none;
}

html[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

html[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

.info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s var(--animation-timing);
}

.info-toggle:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

html[data-theme="light"] .info-toggle {
    background-color: rgba(0, 0, 0, 0.03);
    color: rgba(28, 25, 23, 0.8);
}

.info-toggle svg {
    width: 18px;
    height: 18px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
}

h1 {
    font-size: 3.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 640px) {
    h1 {
        font-size: 6rem;
    }
}

mark {
    position: relative;
    display: inline-block;
    background-color: transparent;
    padding-right: 0.5rem;
    font-weight: 800;
    color: var(--text-color);
}

mark::after {
    content: "";
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    right: 0;
    height: 0.5em;
    background-color: #ff6464;
    border-radius: 0.125rem;
    z-index: -10;
}

html[data-theme="light"] mark::after {
    background-color: #ff6464;
}

.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 24rem;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    transition: transform 0.3s var(--animation-timing),
                box-shadow 0.3s var(--animation-timing);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.info-item {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 240, 223, 0.6);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html[data-theme="light"] .info-label {
    color: rgba(28, 25, 23, 0.6);
}

.info-value {
    font-size: 1.5rem;
    font-weight: 350;
    font-size: 20px;
    color: var(--text-color);
    word-break: break-word;
}

.info-value-container {
    padding: 0.75rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

html[data-theme="light"] .info-value-container {
    background-color: rgba(0, 0, 0, 0.03);
}

#ip-address {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

.copy-btn {
    background-color: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--animation-timing);
    position: relative;
    padding: 0;
}

.copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transform: scale(1.05);
}

html[data-theme="light"] .copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    transition: all 0.2s var(--animation-timing);
}

.copy-btn .check-icon {
    display: none;
    position: absolute;
}

.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .check-icon {
    display: block;
    stroke: #10b981;
}

html[data-theme="light"] .copy-btn.copied .check-icon {
    stroke: #059669;
}

.loading {
    opacity: 0.5;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

.opensource-note {
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 200;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

html[data-theme="light"] .opensource-note {
    color: rgba(28, 25, 23, 0.9);
}

.highlight-opensource {
    position: relative;
    display: inline-block;
    background-color: transparent;
    padding-right: 0.25rem;
    font-weight: 600;
}

.highlight-opensource::after {
    content: "";
    position: absolute;
    top: 85%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 0.5em;
    background-color: #ff6464;
    border-radius: 0.125rem;
    z-index: -10;
}

html[data-theme="light"] .highlight-opensource::after {
    background-color: #ff6464;
}

footer {
    padding: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem 1.5rem;
}

html[data-theme="light"] .social-links {
    background-color: rgba(0, 0, 0, 0.377);
}

.social-link {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.social-link:hover {
    opacity: 1;
}

.social-link svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: var(--text-color);
}

.social-link.shop svg {
    fill: rgb(255, 217, 0);
}

.social-link.rules svg {
    fill: #EF4444;
}

.social-link.discord svg {
    fill: #5865F2;
}

.social-link.shop:hover svg {
    fill: #FFC700;
}

.social-link.rules:hover svg {
    fill: #DC2626;
}

.social-link.discord:hover svg {
    fill: #4752C4;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s var(--animation-timing) forwards;
}

/* Modal styles */
#info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--animation-timing),
                visibility 0.3s var(--animation-timing);
    padding: 1rem;
}

html[data-theme="light"] #info-modal {
    background-color: rgba(0, 0, 0, 0.65);
}

#info-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--background-color);
    width: 100%;
    max-width: 480px;
    border-radius: 1rem;
    box-shadow: 0 25px 50px var(--shadow-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--animation-timing),
                opacity 0.5s var(--animation-timing),
                background-color 0.3s var(--animation-timing),
                border-color 0.3s var(--animation-timing);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

#info-modal.visible .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color);
}

.modal-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.close-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s var(--animation-timing);
}

html[data-theme="light"] .close-button {
    color: rgba(28, 25, 23, 0.6);
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .close-button:hover {
    background-color: rgba(28, 25, 23, 0.1);
    color: rgba(28, 25, 23, 0.9);
}

.close-button svg {
    width: 1.1rem;
    height: 1.1rem;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-body::-webkit-scrollbar {
    display: none;
}

#info-typing-text {
    font-size: 0.95rem;
    line-height: 1.65;
    white-space: pre-line;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

html[data-theme="light"] #info-typing-text {
    color: rgba(28, 25, 23, 0.9);
}

.typing-caret {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--text-color);
    vertical-align: middle;
    animation: blink-caret 1s infinite;
    margin-left: 1px;
}

@keyframes blink-caret {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hidden {
    display: none !important;
}

.logo-img {
    height: 64px;
    width: auto;
    margin-right: 8px;
}

.location-hover {
    position: relative;
    display: inline-block;
}

.location-popup {
    position: absolute;
    top: 50%;
    left: 110%;
    transform: translateY(-50%) scale(0.95);
    width: 330px;
    height: 220px;
    background: var(--background-color);
    border: 3px var(--border-color);   /* roșu */
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    overflow: hidden;
    z-index: 200;

    margin-left: 15px;
}

/* Harta din interior */
.map-popup {
    width: 100%;
    height: 100%;
}

/* Arată harta la hover */
.location-hover:hover .location-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

/* Pe mobil – popup sub text */
/* --- FIX MOBIL: popup peste tot, fără suprapunere text --- */
@media (max-width: 900px) {

    .location-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.9) !important;
        width: 85vw !important;
        height: 55vh !important;

        background: var(--background-color);
        border: 1px solid var(--border-color);
        border-radius: 16px;

        box-shadow: 0 10px 40px rgba(0,0,0,0.4);

        z-index: 99999 !important;
        opacity: 0;
        pointer-events: none;
    }

    .location-hover:hover .location-popup {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1) !important;
    }
}

.info-card,
.info-item,
.container {
    overflow: visible !important;
}
