:root {
  --primary-color: #09c372;
  --secondary-color: #1e40af;
  --dark-bg: #1c1c1c;
  --darker-bg: #121212;
  --text-color: #e0e0e0;
  --text-light: #f0f0f0;
  --card-bg: rgba(26, 26, 26, 0.7);
  --card-border: rgba(64, 64, 64, 0.3);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url(bg.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0;
  padding: 0;
  padding-top: 80px;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



.container {
  display: flex;
  width: 100%;
  max-width: 97%;
  margin: 25px auto;
  gap: 20px;
}

.stats-container {
  display: flex;
  width: 100%;
  gap: 15px;
  margin-bottom: 30px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-left,
.content-right,
.empty-box,
.polak {
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible !important;
  overflow-y: visible !important;
}

.content-right {
  width: 30%;
  font-size: 15px;
}

.polak {
  background-color: rgba(30, 30, 30, 0.85);
}

.header-section {
  padding: 18px 20px;
  border-radius: 10px;
  text-align: center;
  margin: -20px -20px 20px -20px;
  border-bottom: 2px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.header-section h1,
.header-section h2 {
  color: var(--primary-color);
  margin: 0 0 10px 0;
  font-weight: 700;
  position: relative;
}

.header-section h1 {
  font-size: 28px;
  line-height: 1.3;
}

.header-section h2 {
  font-size: 22px;
}

.header-section p {
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
}

label {
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
  color: var(--text-light);
  font-weight: 500;
}

input[type="text"],
select,
textarea {
  width: 75%;
  padding: 12px 15px;
  border: 2px solid #444;
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.7);
  color: var(--text-color);
  margin-bottom: 0;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(9, 195, 114, 0.2);
}

button,
input[type="submit"] {
  background-color: var(--secondary-color);
  color: rgba(255, 255, 255, 0.95);
  padding: 12px 19px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 45%;
}

button:hover,
input[type="submit"]:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.chart-wrapper {
  flex: 1;
  min-height: 480px;
}

.country-wrapper {
  width: 30%;
  min-height: 480px;
}

.chart-container,
.country-stats {
  width: 100%;
  height: 480px;
  background-color: rgba(26, 26, 26, 0.1);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  box-sizing: border-box;
  position: relative;
}

.chart-container h2,
.country-stats h2 {
  text-align: center;
  margin: 0 0 15px 0;
  padding: 0;
  font-size: 1.3em;
}

#connectStatsChart {
  width: 100% !important;
  height: calc(100% - 30px) !important;
}

.country-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.country-item {
  background-color: rgba(30, 30, 30, 0.6);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  font-size: 13px;
  transition: transform 0.2s ease;
}

.country-item:hover {
  transform: translateX(3px);
  background-color: rgba(9, 195, 114, 0.1);
}

.country-name {
  flex: 1;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 50px;
}

.country-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--secondary-color) 0, #005a99 100%);
  border-radius: 4px;
  margin: 0 8px;
  min-width: 40px;
}

.country-percentage {
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  min-width: 45px;
  text-align: right;
}

table {
  width: 100%;
  border-collapse: collapse; /* Aici este modificarea crucială */
  border-spacing: 0; /* Devine redundant cu border-collapse: collapse; */
  margin: 20px 0;
  overflow: hidden; /* Important pentru a ascunde colțurile celulelor */
  border-radius: 15px;
}

td,
th {
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(64, 64, 64, 0.5);
  /* overflow: visible !important; Nu este de obicei necesar și poate cauza probleme cu colțurile rotunjite */
  position: relative;
}

th {
  background-color: var(--secondary-color);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

tr:nth-child(even) {
  background-color: rgba(64, 64, 64, 0.2);
}

tr:nth-child(odd) {
  background-color: rgba(26, 26, 26, 0.3);
}

tr:hover {
  background-color: rgba(9, 195, 114, 0.1);
}

ul.large-text {
  list-style: none;
  padding: 0;
}

ul.large-text li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

ul.large-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateY(-50%);
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
  min-width: 200px;
  width: auto;
  max-width: 300px;
  opacity: 0;
  visibility: hidden;
  text-align: center;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  word-wrap: break-word;
}

.tooltip.left::after {
  left: 0;
  transform: translateX(0);
}

.tooltip.right::after {
  left: 100%;
  transform: translateX(-100%);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.tooltip-container {
  position: relative;
  overflow: visible !important;
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px 0;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-color);
  background: rgba(30, 30, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-color);
  border-color: rgba(9, 195, 114, 0.2);
}

.pagination a.active {
  background: rgba(9, 195, 114, 0.15);
  color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  cursor: default;
}

.pagination a.disabled,
.pagination span.disabled {
  color: rgba(255, 255, 255, 0.2);
  background: rgba(30, 30, 30, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  cursor: default;
}

select {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #252525 url("data:image/svg+xml;charset=UTF-8,SVG_REPLACED") no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  color: #fff;
  font-size: 16px;
  outline: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin-bottom: 15px;
}

select {
  width: 60%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #252525;
  color: #fff;
  font-size: 16px;
  outline: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: block;
  margin: 0 auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,SVG_REPLACED");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 35px;
}

select:hover {
  border-color: #007bff;
}

#optionSelect {
    text-align: center;
  width: 70%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Adaugă o săgeată custom ca fundal */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23000" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;

  /* Spațiu pentru săgeată */
  padding-right: 2rem;


}

#optionSelect option {
  text-align: center;
}

.info-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 5px;
}

.info-card,
.stats-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(5px);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(9, 195, 114, 0.3);
}

.info-header i {
  color: var(--primary-color);
  font-size: 24px;
  margin-right: 12px;
}

.info-header h3 {
  color: var(--text-light);
  font-size: 20px;
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.info-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--text-color);
}

.info-list li:before {
  content: "•";
  color: var(--primary-color);
  font-size: 24px;
  position: absolute;
  left: 0;
  top: -2px;
}

.highlight {
  color: var(--primary-color);
  font-weight: 500;
}

.stats-card {
  text-align: center;
}

.flag-counter {
  margin-top: 15px;
}

#ipport::placeholder {
  text-align: center;
}

footer {
  background-color: var(--dark-bg);
  border-top: 1px solid rgba(9, 195, 114, 0.2);
  padding: 25px 0;
  width: 100%;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 97%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-link {
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s;
  padding: 8px 12px;
  border-radius: 6px;
}

.footer-link:hover {
  color: var(--primary-color);
  background-color: rgba(9, 195, 114, 0.1);
}

.copyright {
  color: var(--text-color);
  font-size: 14px;
  text-align: center;
  padding: 0 15px;
}

.add-server-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.add-server-card button,
.add-server-card input,
.add-server-card label,
.add-server-card textarea {
  width: 80%;
  max-width: 400px;
  margin: 8px auto;
}

.add-server-card button {
  width: auto;
  padding: 12px 24px;
  margin-top: 15px;
}

.faq-container {
    margin-top: 15px;
}

.faq-item {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.3);
    border: 1px solid rgba(64, 64, 64, 0.3);
}

.faq-question {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    background-color: rgba(26, 26, 26, 0.5);
    border: none;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(9, 195, 114, 0.1);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(26, 26, 26, 0.2);
}

.faq-answer p {
    padding: 0 20px;
    margin: 15px 0;
    color: var(--text-color);
    line-height: 1.6;
}

.faq-question.active + .faq-answer {
    padding: 0;
    max-height: 500px;
}

.navbar {
    background-color: var(--dark-bg);
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(9, 195, 114, 0.2);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 97%;
    margin: 0 auto;
    height: 100%;
}

.navbar-logo {
    color: var(--text-light);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo span {
    color: var(--primary-color);
    font-weight: 800;
}

.navbar-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.navbar-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 15px;
    transition: all 0.3s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.navbar-link:hover {
    color: var(--primary-color);
    background: rgba(9, 195, 114, 0.1);
}

.navbar-link i {
    font-size: 16px;
}

.navbar-toggle {
    display: none;	
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
}

@media (max-width: 992px) {
    body {
        padding-top: 60px;
    }
    
    .container {
        flex-direction: column;
        max-width: 100%;
        margin: 15px auto;
        padding: 0 10px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .chart-wrapper, .country-wrapper {
        width: 100%;
    }
    
    .chart-container, .country-stats {
        height: 350px;
        min-height: auto;
    }
    
    .content-right {
        width: 100%;
        margin-top: 20px;
    }
    
    .header-section h1 {
        font-size: 22px;
        line-height: 1.4;
    }
    
    .header-section h2 {
        font-size: 18px;
    }
    
    .header-section p {
        font-size: 14px;
    }
    
    table {
        display: block;
        overflow-x: auto;
       
    }
    .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

    input[type="text"],
    select,
    textarea {
        width: 100%;
    }
    
    button,
    input[type="submit"] {
        width: auto;
        padding: 12px 24px;
    }
    
    .navbar-container {
        padding: 10px 15px;
    }
    
    .navbar-logo span {
        display: inline !important;
        font-size: 18px;
    }
    
    .navbar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        font-size: 24px;
        color: var(--text-light);
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--darker-bg);
        flex-direction: column;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }
    
    .navbar-menu.active {
        max-height: 200px;
        padding: 10px 0;
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-link {
        width: 100%;
        padding: 12px 20px;
        justify-content: flex-start;
        border-radius: 0;
    }
    
    .navbar-link:hover {
        background-color: rgba(9, 195, 114, 0.2);
    }
    
    .navbar-link svg {
        margin-right: 10px;
    }
    
    .faq-question {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .content-left, 
    .content-right, 
    .empty-box, 
    .polak {
        padding: 15px;
    }
    
    .footer-container {
        padding: 15px;
    }
    
    .navbar-logo span {
        display: none;
    }

    .chart-wrapper {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .header-section h1 {
        font-size: 20px;
    }
    
    .header-section h2 {
        font-size: 16px;
    }
    
    td, th {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .country-item {
        font-size: 12px;
    }
    
    input, select, textarea, button {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    table th:nth-child(5),
    table td:nth-child(5) {
        display: none;
    }
    
    .pagination a, 
    .pagination span {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        font-size: 12px;
    }
}

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

.container, 
.content-left, 
.content-right, 
.empty-box, 
.polak,
table {
    box-sizing: border-box;
}

table {
    width: 100%;
    max-width: 100%;
}

.tooltip::after {
    min-width: 150px;
    max-width: 200px;
    font-size: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.country-item .flag-icon {
    min-width: 16px;
}

input, select, textarea, button {
    min-height: 44px;
}

.server-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.server-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    border: 1px solid rgba(64, 64, 64, 0.3);
	transition: all 0.3s ease; /* Animatie smooth */
}
.server-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    border-left-color: #1e40af;
}

.server-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
    padding-top: 15px; /* Poate fi eliminat dacă centrăm perfect */
    display: flex; /* Activăm Flexbox */
    align-items: center; /* Centrează vertical conținutul */
    justify-content: center; /* Centrează orizontal conținutul (dacă e nevoie) */
}

.server-main-info {
    flex-grow: 1;
    padding: 0 15px;
	
}

.server-dns {
    font-weight: 600;
    color: #f0f0f0;
    font-size: 15px;
        padding-top: 5.5px; /* Poate fi eliminat dacă centrăm perfect */
    display: flex; /* Activăm Flexbox */
    align-items: center; /* Centrează vertical conținutul */
    
    
}

.server-ip {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
	    padding-top: 5.5px; /* Poate fi eliminat dacă centrăm perfect */
    display: flex; /* Activăm Flexbox */
    align-items: center; /* Centrează vertical conținutul */
     
}
    
}

.server-right-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 180px;
}

.map-players-row {
    display: flex;
    justify-content: space-between; /* Separă elementele pe întreaga lățime */
    align-items: center;
    width: 180px; /* Aceeași lățime ca bara de progres */
    margin-bottom: 6px;
}

.server-map {
    font-size: 13px;
    color: #aaa;
    /* Elimină orice margin/padding care ar putea afecta alinierea */
    margin: 0;
    padding: 0;
}

.player-count {
    font-size: 13px;
    color: #ccc;
    /* Asigură-te că rămâne în dreapta */
    margin-left: auto;
}

.progress-container {
    width: 180px;
    height: 6px;
    background: rgba(64, 64, 64, 0.5);
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0, #005a99 100%);
    border-radius: 3px;
}

.connections {
    font-size: 12px;
    color: #888;
    margin-top: auto; /* Adaugă această linie */
}

.connections span {
    color: #ccc;
}
@media (max-width: 768px) {
    .server-item {
        flex-direction: column; /* Aranjare verticală */
        padding: 12px;
    }
    
    .server-number {
        min-width: auto;
        padding-top: 0;
        margin-bottom: 8px;
        justify-content: flex-start;
    }
    
    .server-main-info {
        width: 100%;
        padding: 0;
        margin-bottom: 10px;
    }
    
    .server-right-stats {
        width: 100%;
        min-width: 100%;
        align-items: flex-start; /* Aliniere la stânga */
    }
    
    .map-players-row {
        width: 100%;
        justify-content: space-between;
    }
    
    .progress-container {
        width: 100%;
    }
    
    /* Ajustări text pentru mobile */
    .server-dns {
        font-size: 14px;
        padding-top: 0;
        word-break: break-word;
    }
    
    .server-ip {
        font-size: 11px;
        padding-top: 0;
    }
    
    .server-map {
        max-width: 65%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Micșorăm puțin elementele */
    .player-count,
    .server-map {
        font-size: 12px;
    }
    
    .progress-container {
        height: 5px;
        margin-bottom: 6px;
    }
    
    .connections {
        font-size: 11px;
    }
}

/* Optimizări suplimentare pentru ecrane foarte mici */
@media (max-width: 400px) {
    .server-item {
        padding: 10px;
    }
    
    .server-dns {
        font-size: 13px;
    }
    
    .server-ip {
        font-size: 10px;
    }
}
.more-info-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    margin-top: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.more-info-btn:hover {
    background-color: #07a15e;
}