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

:root {
    --primary: #8B4513;
    --secondary: #D2691E;
    --dark: #2c1810;
    --light: #f5f5dc;
    --accent: #FFD700;
    --grass: #7CB342;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c1810 0%, #4a2c1f 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    color: var(--accent);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    color: var(--light);
}

/* Navigation */
nav {
    background: rgba(0,0,0,0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--secondary);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover {
    background: var(--secondary);
    color: var(--accent);
    transform: translateY(-2px);
}

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

.section {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Info Box */
.info-box {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

code {
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--grass);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #558b2f;
    transform: scale(1.05);
}

/* Server Cards */
.server-card {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 10px;
    border: 2px solid var(--secondary);
}

.server-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* New Server List Styles */
.server-list {
    margin-top: 1.5rem;
}

.server-item {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
    border: 2px solid var(--secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.server-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.server-header h3 {
    color: var(--accent);
    margin: 0;
    font-size: 1.4rem;
}

.server-status {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
}

.expand-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.3s;
}

.server-item.active .expand-icon {
    transform: translateY(-50%) rotate(180deg);
}

.dynmap-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.dynmap-wrapper.active {
    max-height: 600px;
}

.dynmap-container-small {
    height: 400px;
    margin: 1rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--secondary);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dynmap-container-small:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.dynmap-container-small iframe {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-hint {
    text-align: center;
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Dynmap Container */
.dynmap-container {
    position: relative;
    width: 100%;
    height: 500px;
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--secondary);
    background: rgba(0,0,0,0.5);
}

.dynmap-container iframe {
    width: 100%;
    height: 100%;
}

.map-info {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0,0,0,0.7);
    font-size: 0.9rem;
    color: var(--accent);
}

/* Commands Grid */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.command-card {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--grass);
    transition: all 0.3s;
}

.command-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left-color: var(--accent);
}

.command-card code {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.command-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* New Command Server Styles */
.commands-servers {
    margin-top: 1.5rem;
}

.command-server-item {
    background: rgba(0,0,0,0.3);
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
    border: 2px solid var(--secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.command-server-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.command-server-item h3 {
    color: var(--accent);
    margin: 0;
    font-size: 1.3rem;
}

.command-server-item.active .expand-icon {
    transform: rotate(180deg);
}

.command-mods-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 1.5rem;
}

.command-mods-wrapper.active {
    max-height: 500px;
    padding: 1rem 1.5rem;
}

.command-mod {
    background: rgba(0,0,0,0.4);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border-left: 4px solid var(--grass);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-mod:hover {
    border-left-color: var(--accent);
    transform: translateX(5px);
    background: rgba(0,0,0,0.6);
}

.view-btn {
    background: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.command-mod:hover .view-btn {
    background: var(--accent);
    color: var(--dark);
}

/* Mods Container */
.mods-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.mod-category {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--secondary);
}

.mod-category h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.mod-category ul {
    list-style-position: inside;
}

.mod-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mod-category li:last-child {
    border-bottom: none;
}

/* Rules */
.rules ol {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent);
}

.rules li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    cursor: pointer;
}

.fullscreen-modal.active {
    display: flex;
    flex-direction: column;
}

.fullscreen-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.8);
    padding: 0.5rem 1.5rem;
    border-radius: 10px;
    z-index: 10001;
    transition: all 0.3s;
}

.close-btn:hover {
    background: var(--accent);
    color: var(--dark);
}

/* Command Modal */
.command-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.command-modal.active {
    display: flex;
}

.command-modal-content {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    padding: 2rem;
    border-radius: 20px;
    border: 3px solid var(--accent);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    cursor: default;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.command-modal-content h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

#command-modal-body .command-card {
    margin: 0.5rem 0;
}

/* Footer */
footer {
    background: var(--dark);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    border-top: 3px solid var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .dynmap-container {
        height: 400px;
    }
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.98) 0%, rgba(74, 44, 31, 0.98) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.login-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem;
    border-radius: 20px;
    border: 3px solid var(--accent);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.5s ease-out;
}

.login-box h2 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.login-box p {
    color: var(--light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.login-box input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--secondary);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    outline: none;
    transition: all 0.3s;
}

.login-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.login-box button {
    width: 100%;
    padding: 1rem;
    background: var(--grass);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-box button:hover {
    background: #558b2f;
    transform: scale(1.05);
}

.error-msg {
    color: #ff4444;
    margin-top: 1rem;
    font-weight: 600;
    min-height: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s;
}

.section {
    animation: fadeIn 0.6s ease-out;
}
