/* style.css */
:root {
    --viking-gold: #d4af37;
    --viking-brown: #8b4513;
    --viking-red: #cc3311;
    --dark-blue: #1e3a5f;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
}

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

body {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #2c5f41 100%);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

body main.container section {
    margin-top: 2em;
}

header {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--viking-gold);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-links a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--viking-gold);
    transform: translateY(-1px);
}

/* Main content */
main {
    padding: 2rem 0;
}

/* Cards */
.server-card, .form-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: var(--viking-gold);
    color: var(--dark-gray);
}

.btn-primary:hover {
    background: #b8941f;
}

.btn-danger {
    background: var(--viking-red);
    color: white;
}

.btn-danger:hover {
    background: #aa2200;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--viking-gold);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

/* SEO-friendly text styling */
h1, h2, h3 {
    color: var(--viking-gold);
    margin-bottom: 1rem;
}

.disclaimer {
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid var(--viking-red);
    padding: 1rem;
    margin: 2rem 0;
    font-size: 0.9rem;
}

/* Add to style.css */

.markdown-content {
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: var(--viking-gold);
    margin: 1rem 0 0.5rem 0;
}

.markdown-content h1 { font-size: 1.5em; }
.markdown-content h2 { font-size: 1.3em; }
.markdown-content h3 { font-size: 1.1em; }

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content blockquote {
    border-left: 4px solid var(--viking-gold);
    margin: 1rem 0;
    padding-left: 1rem;
    font-style: italic;
    color: #ccc;
}

.markdown-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content a {
    color: var(--viking-gold);
    text-decoration: underline;
}

.markdown-content a:hover {
    color: #fff;
}

.markdown-content strong {
    color: var(--viking-gold);
    font-weight: bold;
}

.markdown-content em {
    font-style: italic;
    color: #ddd;
}

.markdown-content hr {
    border: none;
    border-top: 2px solid var(--viking-gold);
    margin: 2rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    text-align: left;
}

.markdown-content th {
    background: rgba(212, 175, 55, 0.2);
    color: var(--viking-gold);
}
/* Add to style.css */

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--viking-red);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    color: var(--viking-red);
}

.seo-content h2, 
.seo-content h3 {
    color: var(--viking-gold);
    margin-bottom: 1rem;
}

.seo-content ul {
    padding-left: 2rem;
    margin: 1rem 0;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

/* Server card improvements */
.server-card .server-info span {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 3px;
    font-size: 0.8em;
}

.password-protected {
    background: rgba(255, 152, 0, 0.2) !important;
    color: #ff9800;
}

/* Search box improvements */
.search-box input:focus {
    outline: 2px solid var(--viking-gold);
}

.search-btn:hover {
    background: #b8941f;
}

/* Mobile responsive improvements */
@media (max-width: 576px) {
    .server-actions {
        flex-direction: column;
    }
    
    .server-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Link Styling */

/* Default link styling */
a {
    color: var(--viking-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--viking-gold);
}

/* Navigation links */
.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--viking-gold);
    transform: translateY(-2px);
}

.nav-links a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--viking-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before {
    width: 80%;
}

/* Content area links */
.content-link,
.popular-link {
    display: inline-block;
    color: var(--viking-gold);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--viking-gold);
    border-radius: 8px;
    margin: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.content-link:hover,
.popular-link:hover {
    background: var(--viking-gold);
    color: var(--dark-gray);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.content-link::before,
.popular-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.content-link:hover::before,
.popular-link:hover::before {
    left: 100%;
}

/* List links styling */
ul li a {
    color: var(--viking-gold);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

ul li a:hover {
    border-left-color: var(--viking-gold);
    padding-left: 1.5rem;
    color: #fff;
    background: rgba(212, 175, 55, 0.1);
}

/* Server type links (badges) */
.server-type-link {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--viking-gold);
    border-radius: 25px;
    color: var(--viking-gold);
    text-decoration: none;
    margin: 0.3rem;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.server-type-link:hover,
.server-type-link.active {
    background: var(--viking-gold);
    color: var(--dark-gray);
    transform: scale(1.05);
}

/* Special effects for important links */
.glow-link {
    position: relative;
    text-shadow: 0 0 10px var(--viking-gold);
}

.glow-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--viking-gold);
    opacity: 0;
    border-radius: 5px;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.glow-link:hover::after {
    opacity: 0.1;
}

/* Social/external links */
.external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.external-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.external-link::after {
    content: '↗';
    font-size: 0.8em;
}

/* Breadcrumb links */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9em;
}

.breadcrumb a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--viking-gold);
}

.breadcrumb::before {
    content: '🏠';
    margin-right: 0.5rem;
}

.breadcrumb > *:not(:last-child)::after {
    content: '⚔️';
    margin: 0 0.5rem;
    color: var(--viking-gold);
}

/* Action links (like edit, delete) */
.action-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.2rem;
}

.action-link.edit {
    color: #4caf50;
    border: 1px solid #4caf50;
}

.action-link.edit:hover {
    background: #4caf50;
    color: white;
}

.action-link.delete {
    color: var(--viking-red);
    border: 1px solid var(--viking-red);
}

.action-link.delete:hover {
    background: var(--viking-red);
    color: white;
}

.action-link.view {
    color: #2196f3;
    border: 1px solid #2196f3;
}

.action-link.view:hover {
    background: #2196f3;
    color: white;
}

/* Footer links */
footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--viking-gold);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .content-link,
    .popular-link {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .nav-links a {
        padding: 0.3rem 0.6rem;
        font-size: 0.9em;
    }
}

/* Viking-themed special effects */
@keyframes vikingGlow {
    0% { text-shadow: 0 0 5px var(--viking-gold); }
    50% { text-shadow: 0 0 20px var(--viking-gold), 0 0 30px var(--viking-gold); }
    100% { text-shadow: 0 0 5px var(--viking-gold); }
}

.glow-link:hover {
    animation: vikingGlow 2s infinite;
}

/* Rune-style underline effect */
.rune-link {
    position: relative;
}

.rune-link::after {
    content: '᚛ ᚜';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    color: var(--viking-gold);
    font-size: 0.8em;
    transition: opacity 0.3s ease;
}

.rune-link:hover::after {
    opacity: 1;
}

/* Active Navigation Link Styling */
.nav-links a.active {
    background: var(--viking-gold) !important;
    color: var(--dark-gray) !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.nav-links a.active:hover {
    background: #b8941f !important;
    color: var(--dark-gray) !important;
}


.nav-links a.active::before {
    width: 100%;
    background-color: var(--dark-gray);
}

/* Active with rune decoration */
.nav-links a.active-rune::after {
    content: '⚔️';
    margin-left: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1px); }
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.username {
    color: var(--viking-gold);
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s ease;
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
}

.username:hover {
    background: rgba(212, 175, 55, 0.2);
}


.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 40, 60, 0.98);
    border: 2px solid var(--viking-gold);
    border-radius: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.user-menu:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 0.8rem 1rem;
    color: #fff !important;
    text-decoration: none;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background: var(--viking-gold) !important;
    color: var(--dark-gray) !important;
}


/* MOBILE MENU */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 3px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--viking-gold);
    transition: 0.3s;
    border-radius: 2px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        position: relative;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(20, 40, 60, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        backdrop-filter: blur(10px);
        z-index: 999;
        gap: 2rem;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        text-align: center;
        min-width: 200px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        margin-top: 1rem;
    }
    
    .user-menu:hover .dropdown,
    .user-menu .dropdown {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    
    header {
        padding: 0.8rem 0;
    }
}

/* Better line break and paragraph handling */
.markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content br {
    line-height: 1.8; /* Adds extra spacing for <br> tags */
}

.server-description {
    white-space: pre-line; /* Preserves line breaks and spaces */
    line-height: 1.6;
}

/* For textarea preview */
.preview-area {
    white-space: pre-wrap; /* Preserves whitespace and line breaks */
    word-wrap: break-word;
    line-height: 1.6;
}