/* Hytale-inspired Dark Theme */

:root {
    /* --hytale-dark: #0a0a0a;
    --hytale-darker: #050505; */
    --hytale-dark: #19293e;
    --hytale-darker: #132338;
    --hytale-gray: #1a1a1a;
    --hytale-gray-light: #2a2a2a;
    --hytale-gray-lighter: #3a3a3a;
    --hytale-accent: #4a9eff;
    --hytale-accent-hover: #5fb0ff;
    --hytale-accent-dark: #2d7fd4;
    --hytale-purple: #8b5cf6;
    --hytale-text: #e0e0e0;
    --hytale-text-muted: #a0a0a0;
    --hytale-border: #333333;
    --hytale-success: #10b981;
    --hytale-warning: #f59e0b;
    --hytale-danger: #ef4444;
    --hytale-card-bg: rgba(26, 26, 26, 0.8);
    --hytale-overlay: rgba(0, 0, 0, 0.7);
    --hytale-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --hytale-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --hytale-glow: 0 0 20px rgba(74, 158, 255, 0.3);
}

/* Base Styles */
html {
    height: 100%;
}

html, body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    background-color: #17213a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23020406' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");

    color: var(--hytale-text);
    font-family: 'Noto Sans', sans-serif;

    line-height: 1.6;
    flex: 1;
}

.server-name {
	background: linear-gradient(#dae9f2, #adcde2);
	background-clip: text;

	-webkit-text-fill-color: transparent;
	-webkit-background-clip: text;
}

/* Navbar */
.navbar-dark {
    background-color: #203658 !important;
    border-bottom: 1px solid var(--hytale-border);
    box-shadow: var(--hytale-shadow);
}

.navbar-brand {
    color: var(--hytale-accent) !important;
    font-weight: 600;
    font-size: 1.25rem;
    transition: color 0.3s ease;

	background: linear-gradient(#dae9f2, #adcde2);
	background-clip: text;

	-webkit-text-fill-color: transparent;
	-webkit-background-clip: text;

}

.navbar-brand:hover {
    color: var(--hytale-accent-hover) !important;
}

.nav-link {
    color: var(--hytale-text-muted) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--hytale-accent) !important;
}

/* Cards */
.card {
    background-color: #0E1726;
    border: 1px solid var(--hytale-border);
    border-radius: 8px;
    box-shadow: var(--hytale-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hytale-shadow-lg);
}

.card-body {
    color: var(--hytale-text);
}

.card-title {
    color: var(--hytale-text);
    font-weight: 600;
}

/* Server List Card */
.server-card {
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.server-card-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    transform: scale(1.1);
}

.server-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hytale-overlay);
}

.server-card-content {
    position: relative;
    z-index: 1;
    border: 1px solid #70839d;
}

.server-card-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: -1;
}

.server-card-content::after {
    content: "";
    position: absolute;
    bottom: 0px;
    right: 0px;
    left: 0px;
    top: 0px;
    background-repeat: no-repeat;
    background-image: url("https://cdn.hytale.it/hytaleit-corner.png"),
        url("https://cdn.hytale.it/hytaleit-corner.png"),
        url("https://cdn.hytale.it/hytaleit-corner.png"),
        url("https://cdn.hytale.it/hytaleit-corner.png");
    pointer-events: none;
    background-position: left -16px top -16px, right -16px top -16px,
        left -16px bottom -16px, right -16px bottom -16px;
}

.server-card-no-banner {
    background-color: var(--hytale-gray);
}

.server-position-badge {
    font-size: 1.2rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--hytale-accent) !important;
    border: none;
}

.server-logo {
    max-height: 80px;
    max-width: 200px;
    width: 200px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

.server-icon-small {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
}

.server-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.server-status-dot.online {
    animation: pulse 2s infinite;
    background-color: var(--hytale-success);
    box-shadow: 0 0 4px var(--hytale-success);
}

.server-status-dot.offline {
    background-color: var(--hytale-danger);
    box-shadow: 0 0 4px var(--hytale-danger);
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.clicking:active {
    transform: translateY(2px);
}

.clicking:hover {
    transform: scale(1.1);
}

.server-vote-button {
    min-width: 80px;
}

.voted {
    color: rgb(207, 38, 38);
}

.clear-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--hytale-text);
    cursor: pointer;
}

.server-address {
    color: var(--hytale-text);
    font-weight: 600;
    margin-bottom: 0;
}

.default-icon {
    color: var(--hytale-text);
}

.server-address-input {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--hytale-dark);
    border: 1px solid var(--hytale-border);
    max-width: 300px;
}

.server-address-input:focus {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: var(--hytale-accent);
    box-shadow: 0 0 0 0.2rem rgba(74, 158, 255, 0.25);
}

.input-group-text {
    background-color: var(--hytale-gray);
    border: 1px solid var(--hytale-border);
    color: var(--hytale-text);
}

.server-stats-badge {
    font-size: 0.9rem;
}

.server-button-group {
    min-width: 250px;
}

/* Buttons */
.btn-primary {
    background-color: var(--hytale-accent);
    border-color: var(--hytale-accent);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--hytale-accent-hover);
    border-color: var(--hytale-accent-hover);
    box-shadow: var(--hytale-glow);
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--hytale-success);
    border-color: var(--hytale-success);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-outline-light {
    border-color: var(--hytale-gray-lighter);
    color: var(--hytale-text);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--hytale-text);
    border-color: var(--hytale-gray-lighter);
    /* color: white; */
}

.btn-secondary {
    background-color: var(--hytale-gray-light);
    border-color: var(--hytale-gray-light);
    color: var(--hytale-text);
}

.btn-warning {
    background-color: var(--hytale-warning);
    border-color: var(--hytale-warning);
}

.btn-danger {
    background-color: var(--hytale-danger);
    border-color: var(--hytale-danger);
}

.btn-outline-primary {
    border-color: var(--hytale-accent);
    color: var(--hytale-accent);
}

.btn-outline-primary:hover {
    background-color: var(--hytale-accent);
    border-color: var(--hytale-accent);
    color: white;
}

/* Forms */
.form-control {
    background-color: var(--hytale-gray);
    border: 1px solid var(--hytale-border);
    color: var(--hytale-text);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: var(--hytale-gray-light);
    border-color: var(--hytale-accent);
    color: var(--hytale-text);
    box-shadow: 0 0 0 0.2rem rgba(74, 158, 255, 0.25);
}

.form-control::placeholder {
    color: var(--hytale-text-muted);
}

.form-label {
    color: var(--hytale-text);
    font-weight: 500;
}

.form-text {
    color: var(--hytale-text-muted);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
}

.bg-primary {
    background-color: var(--hytale-accent) !important;
}

.bg-success {
    background-color: var(--hytale-success) !important;
}

.bg-warning {
    background-color: var(--hytale-warning) !important;
}

.bg-danger {
    background-color: var(--hytale-danger) !important;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: 1px solid var(--hytale-border);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--hytale-success);
    color: var(--hytale-success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--hytale-danger);
    color: var(--hytale-danger);
}

.alert-info {
    background-color: rgba(74, 158, 255, 0.1);
    border-color: var(--hytale-accent);
    color: var(--hytale-accent);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--hytale-warning);
    color: var(--hytale-warning);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--hytale-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--hytale-accent-hover);
}

.breadcrumb-item.active {
    color: var(--hytale-text);
}

/* Server Detail Page */
.server-banner {
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.server-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.server-detail-title {
    color: var(--hytale-text);
    font-weight: 600;
}

.text-muted {
    color: var(--hytale-text-muted) !important;
}

/* Image Previews */
.img-thumbnail {
    background-color: var(--hytale-gray);
    border: 1px solid var(--hytale-border);
    border-radius: 6px;
    padding: 4px;
}

.img-thumbnail img {
    max-width: 100%;
    height: auto;
}

/* Pagination */
.pagination {
    --bs-pagination-bg: var(--hytale-gray);
    --bs-pagination-border-color: var(--hytale-border);
    --bs-pagination-color: var(--hytale-text);
    --bs-pagination-hover-bg: var(--hytale-gray-light);
    --bs-pagination-hover-color: var(--hytale-accent);
    --bs-pagination-active-bg: var(--hytale-accent);
    --bs-pagination-active-border-color: var(--hytale-accent);
}

.page-link {
    color: var(--hytale-text);
}

.page-link:hover {
    color: var(--hytale-accent);
}

/* Input Group */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Disabled Buttons */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Links */
a {
    color: var(--hytale-accent);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hytale-accent-hover);
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "penumbra serif std", "noto sans" !important;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(rgb(255, 233, 141), rgb(225, 159, 39)) text;
    text-transform: uppercase;
    font-weight: 700;
}

/* Main Container */
main {
    background: transparent;
    flex: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--hytale-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--hytale-gray-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hytale-gray-lighter);
}

/* Bootstrap Overrides */
.btn-close {
    color: var(--hytale-text);
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
    color: var(--hytale-text);
}

/* End bootstrap overrides */
.text-adapt {
    font-size: clamp(1.2rem, 2vw, 2vw);
    word-break: break-all;
    font-weight: 600;
}

.status-badge {
    font-size: clamp(0.5em, 0.75em, 1em);
    white-space: nowrap;
}

.vote-heart {
    cursor: pointer;
}

.mh-140 {
    max-height: 140px;
}

.mw-140 {
    max-width: 140px;
}

.minw-50 {
    min-width: 50px;
}
.minh-50 {
    min-height: 50px;
}

.icon-max-size {
    max-width: 140px;
    max-height: 10px;
    min-width: 50px;
    min-height: 50px;
}

.edit-server-button {
    width: 40px;
    height: 40px;
    padding: 5px;
    right: 8px;
    top: 8px;
    border-radius: 5px;
    background-color: var(--hytale-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .border-md-none {
        border: none !important;
    }
}


.modal-color {
    background-color: var(--hytale-dark);
}

/* Footer */
.site-footer {
    background-color: var(--hytale-darker);
    border-top: 1px solid var(--hytale-border);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.site-footer h2 {
    color: var(--hytale-text);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.site-footer p {
    color: var(--hytale-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.site-footer a {
    color: var(--hytale-accent);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.site-footer a:hover {
    color: var(--hytale-accent-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1.5rem;
        margin-top: 2rem;
    }

    .site-footer .col-md-4 {
        margin-bottom: 2rem;
    }
}
