:root {
    --primary-color: #10b981;
    --primary-hover: #059669;

    /* Light mode defaults */
    --border-color: #d4d4d5;
    --badge-bg: #f0f0f0;
    --text-color: #000;
    --muted-text-color: #555;
    --banner-mobile-bg: #e0e0e0;
}

body.dark {
    --border-color: #2a2a2a;
    --badge-bg: #2b2d31;
    --text-color: #ffffff;
    --muted-text-color: #aaaaaa;
    --banner-mobile-bg: #404040;
}

body.light {
    --border-color: #d4d4d5;
    --badge-bg: #f0f0f0;
    --text-color: #000;
    --muted-text-color: #555;
    --banner-mobile-bg: #e0e0e0;
}
.neon-text {
    color: #fff;
    text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #ff005e, 0 0 10px #ff005e, 0 0 20px #ff005e, 0 0 40px #ff005e, 0 0 80px #ff005e;
    }
    100% {
        text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff, 0 0 80px #00d4ff, 0 0 160px #00d4ff;
    }
}

.matrix-text {
    color: #0f0;
    font-family: monospace;
    position: relative;
    text-shadow: 0 0 10px #0f0, 0 0 20px #0f0, 0 0 30px #0f0;
    z-index: 2;
}

.matrix-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: glitch 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
    color: #0f0;
    text-shadow: 0 0 5px #0f0, 0 0 15px #0f0;
}

@keyframes glitch {
    0%, 100% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
        transform: translate(0);
    }
    33% {
        clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%);
        transform: translate(-5px, -5px);
    }
    66% {
        clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0 100%);
        transform: translate(5px, 5px);
    }
}

.ui.ui.ui.container:not(.fluid) {
    max-width: 1280px !important;
    width: 100%;
}
@media (max-width: 768px) {
    .ui.ui.ui.container:not(.fluid) {
        max-width: 100% !important;
        width: auto;

    }
}

.server-map {
    color: var(--text-color);
    width: 100%;
    height: 100px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    /*border-bottom: 1px solid var(--border-color);*/
    /*TEST*/
    border: 1px solid #10b981;
    border-radius: 8px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.server-map.sponsor-server {
    /* neon effect */
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
    border: 1px solid #10b981;
    border-radius: 8px;
    animation: neon-glow 1.5s infinite alternate;
}

.server-stats-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 22%;
    flex-shrink: 0;
}

/* Tablet layout (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .server-map {
        height: 85px;
        padding: 12px;
        gap: 6px;
    }
    
    .server-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .server-info {
        width: 11%;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .server-stats-container {
        width: 20%;
        flex-shrink: 0;
        gap: 2px;
        min-width: 0;
    }
    
    .server-banner {
        width: 32%;
        height: auto;
        aspect-ratio: 7.8;
        flex-shrink: 0;
    }
    
    .copy-buttons {
        width: 8%;
        flex-shrink: 0;
        flex-grow: 1;
    }
    
    .vote-block {
        width: 4%;
        flex-shrink: 0;
    }
    
    .server-name {
        font-size: 12px;
        margin-bottom: 1px;
        line-height: 1.2;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .server-ip {
        font-size: 9px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .server-stats {
        gap: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .server-tags {
        gap: 3px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .tag {
        padding: 1px 4px;
        font-size: 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .online-status {
        gap: 3px;
        margin-right: 4px;
        flex-shrink: 0;
    }
    
    .status-indicator {
        width: 6px;
        height: 6px;
    }
    
    .online-text {
        font-size: 9px;
        white-space: nowrap;
    }
    
    .stat-badge {
        padding: 1px 4px;
        font-size: 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .copy-ip-btn {
        height: 20px;
        font-size: 8px;
        white-space: nowrap;
    }
    
    .vote-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .vote-count {
        font-size: 9px;
        white-space: nowrap;
    }
}

/* Laptop layout (1024px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .server-map {
        gap: 8px;
        height: 90px;
        padding: 14px;
    }
    
    .server-avatar {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .server-info {
        width: 12%;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .server-stats-container {
        width: 19%;
        flex-shrink: 0;
        gap: 3px;
        min-width: 0;
    }
    
    .server-banner {
        width: 36%;
        height: auto;
        aspect-ratio: 7.8;
        flex-shrink: 0;
    }
    
    .copy-buttons {
        width: 7.5%;
        flex-shrink: 0;
        flex-grow: 1;
    }
    
    .vote-block {
        width: 3.5%;
        flex-shrink: 0;
    }
    
    .server-name {
        font-size: 14px;
        margin-bottom: 2px;
        line-height: 1.2;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .server-ip {
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .server-stats {
        gap: 5px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .server-tags {
        gap: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .tag {
        padding: 2px 5px;
        font-size: 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .online-status {
        gap: 4px;
        margin-right: 6px;
        flex-shrink: 0;
    }
    
    .status-indicator {
        width: 7px;
        height: 7px;
    }
    
    .online-text {
        font-size: 10px;
        white-space: nowrap;
    }
    
    .stat-badge {
        padding: 2px 5px;
        font-size: 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .copy-ip-btn {
        height: 24px;
        font-size: 9px;
        white-space: nowrap;
    }
    
    .vote-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .vote-count {
        font-size: 10px;
        white-space: nowrap;
    }
}

/* Desktop layout (1440px+) */
@media (min-width: 1441px) {
    .server-avatar {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .server-info {
        width: 15%;
        flex-shrink: 0;
    }
    
    .server-stats-container {
        width: 22%;
        flex-shrink: 0;
    }
    
    .server-banner {
        width: 468px;
        height: 60px;
        aspect-ratio: unset;
        flex-shrink: 0;
    }
    
    .copy-buttons {
        width: 7%;
        flex-shrink: 0;
        flex-grow: 1;
    }
    
    .vote-block {
        width: 3%;
        flex-shrink: 0;
    }
}

/* Large desktop layout (1600px+) для точних розмірів */
@media (min-width: 1600px) {
    .server-banner {
        width: 468px;
        height: 60px;
        aspect-ratio: unset;
    }
}

/*.server-map:last-child {*/
/*    border-bottom: none;*/
/*}*/

.server-avatar {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
}

.server-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.server-info {
    width: 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    min-width: 0;
}

.server-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.server-ip {
    font-size: 14px;
    color: var(--muted-text-color);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.server-row .vote-block {
    margin-left: 0;
}

.server-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}

.stat-badge {
    background-color: var(--badge-bg);
    color: var(--text-color);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-badge.version {
    background-color: transparent;
    font-weight: bold;
    /*color: #000000;*/
}

.stat-badge.success-verification {
    background-color: transparent;
    color: var(--primary-color);
}

.stat-badge.warning-verification {
    background-color: transparent;
    color: #be2617;
}

.stat-badge.sponsor {
    background-color: transparent;
    color: gold;
}

.stat-badge.java-bedrock {
    background-color: var(--primary-color);
    color: #000000;
    font-size: 10px;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    flex-shrink: 0;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-indicator.online {
    background-color: var(--primary-color);
}
.status-indicator.offline {
    background-color: #be2617;
}

.online-text {
    min-width: 45px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.server-tags {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    /*overflow: hidden;*/
    justify-content: flex-start;
    align-items: center;
}

.tag {
    background-color: transparent;
    color: var(--text-color);
    padding: 4px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag.last {
    margin-left: auto;
    background-color: rgba(16, 185, 129, 0.08);
}

.copy-buttons {
    width: 7%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    flex-grow: 1;
}
.copy-ip-btn-group {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: row;
    gap: 4px;
}

.copy-ip-btn {
    width: 100%;
    height: 28px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-ip-btn:hover {
    background-color: var(--primary-hover);
}

.copy-ip-btn:nth-child(2) {
    background-color: transparent;
    border: 1px solid var(--primary-color);
}

.copy-ip-btn:nth-child(2):hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.vote-block {
    width: 3%;
    background-color: transparent;
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-icon {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-icon svg {
    width: 28px;
    height: 28px;
}

.vote-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1;
    text-align: center;
}

.server-banner {
    width: 35%;
    height: auto;
    aspect-ratio: 7.8;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.server-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.server-stats-mobile {
    display: none;
}

.server-banner-mobile {
    display: none;
}

.server-banner-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.server-tags-mobile {
    display: none;
}

.copy-buttons-mobile {
    display: none;
}

.separator {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .server-map {
        flex-direction: column;
        height: auto;
        gap: 10px;
        padding-inline: 0px;
        padding-block: 15px;
    }
    
    .server-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .server-avatar {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .server-info {
        flex: 1;
        min-width: 0;
    }
    
    .server-name {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .server-ip {
        font-size: 13px;
    }
    
    .vote-block {
        width: auto;
        flex-shrink: 0;
        margin-left: 0;
    }
    
    .vote-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .vote-count {
        font-size: 11px;
    }
    
    .server-stats-container {
        display: none;
    }
    
    .server-banner {
        display: none;
    }
    
    .copy-buttons {
        display: none;
    }
    
    .server-stats-mobile {
        display: flex;
        gap: 8px;
        align-items: center;
        width: 100%;
        order: 2;
    }
    
    .server-banner-mobile {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 7.8;
        background-color: var(--banner-mobile-bg);
        background-size: cover;
        background-position: center;
        border-radius: 4px;
        margin-left: 0;
        order: 3;
    }
    
    .server-tags-mobile {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
        order: 4;
    }
    
    .server-tags-mobile .tag:last-child {
        margin-left: auto;
        background-color: rgba(16, 185, 129, 0.08);
    }
    
    .separator {
        display: block;
        order: 5;
        width: 100%;
    }
    
    .copy-buttons-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        width: 100%;
        order: 6;
    }
    
    .copy-buttons-mobile .copy-ip-btn {
        min-width: auto;
        height: 40px;
        font-size: 14px;
    }
}
