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


/* CSS Variables - Dark Theme */
:root {
    --background: hsl(0, 0%, 0%);
    --foreground: hsl(0, 0%, 98%);
    --border: hsl(0, 0%, 100%);
    --card: hsla(0, 0%, 0%, 0);
    --textglav: hsl(278, 100%, 36%);
    --card-foreground: hsl(0, 0%, 98%);
    --card-border: hsla(0, 0%, 0%, 0);
    --primary: hsl(0, 0%, 0%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsla(0, 0%, 0%, 0);
    --secondary-foreground: hsl(0, 0%, 98%);
    --muted: hsl(0, 0%, 18%);
    --muted-foreground: hsl(0, 0%, 65%);
    --accent: hsl(0, 0%, 18%);
    --accent-foreground: hsl(0, 0%, 98%);
    --elevate-1: rgba(255,255,255, 0.04);
    --elevate-2: rgba(255,255,255, 0.09);
    --radius: 0.5rem;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header-container {
        padding: 1rem 2rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--textglav);
}

@media (min-width: 768px) {
    .header-title {
        font-size: 1.5rem;
    }
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.social-btn:hover::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    z-index: 999;
    background-color: var(--elevate-1);
}

.social-btn:active::after {
    background-color: var(--elevate-2);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(159, 122, 234, 0.1), transparent);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 1rem;
    max-width: 56rem;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.server-ip {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .server-ip {
        flex-direction: row;
        justify-content: center;
    }
}

.server-ip-label {
    font-size: 1rem;
    color: var(--muted-foreground);
}

.server-ip-value {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--textglav);
    background-color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .server-ip-value {
        font-size: 1.5rem;
    }
}

/* Features Section */
.features {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .features {
        padding: 6rem 0;
    }
}

.features-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .features-title {
        font-size: 3rem;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Feature Card */
.feature-card {
    border: 1px solid var(--border);
    background-color: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(2rem);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card:hover::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    z-index: 999;
    background-color: var(--elevate-1);
}

.feature-card:active::after {
    background-color: var(--elevate-2);
}

.feature-image {
    aspect-ratio: 16/9;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.feature-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .feature-title {
        font-size: 1.25rem;
    }
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    white-space: nowrap;
}

.feature-description {
    font-size: 0.875rem;
    line-height: 1.625;
    color: var(--muted-foreground);
    flex: 1;
    margin-bottom: 1rem;
}

.feature-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    min-height: 2rem;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border-color: var(--border);
}

.btn:hover::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    z-index: 999;
    background-color: var(--elevate-1);
}

.btn:active::after {
    background-color: var(--elevate-2);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    flex: 1;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    background-color: var(--card);
    padding: 3rem 0;
}

.footer .container {
    text-align: center;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    width: 90%;
    max-width: 48rem;
    max-height: 90vh;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.2s ease;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    color: var(--foreground);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: calc(var(--radius) - 4px);
}

.modal-close:hover {
    opacity: 1;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.modal-scroll {
    max-height: calc(90vh - 8rem);
    overflow-y: auto;
    padding-right: 1rem;
}

.modal-scroll::-webkit-scrollbar {
    width: 0.5rem;
}

.modal-scroll::-webkit-scrollbar-track {
    background: var(--secondary);
    border-radius: var(--radius);
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius);
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modal-gallery-item {
    aspect-ratio: 16/9;
    background-color: var(--secondary);
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-description-text {
    font-size: 0.875rem;
    line-height: 1.625;
    color: var(--muted-foreground);
    white-space: pre-wrap;
}

.modal-commands {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-command {
    padding: 0.75rem 1rem;
    background-color: var(--secondary);
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Rules Modal */
.rules-modal-content {
    max-width: 56rem;
}

.rules-subtitle {
    font-size: 1rem;
    color: var(--textglav);
    font-weight: 600;
}

.rules-scroll {
    max-height: calc(90vh - 8rem);
}

.rules-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rule-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 1rem;
}

.rule-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: calc(var(--radius) - 4px);
}

/* Utility */
.icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
}
