/* CSS Variables for easy color scheme changes */
:root {
    /* Primary Colors */
    --primary-gradient-start: #1f2749;
    --primary-gradient-end: #532483;
    --accent-color: hsl(245, 36%, 68%);
    --accent-hover: #9145a0;
    
    /* Background Colors */
    --header-bg: rgba(255, 255, 255, 0.1);
    --card-bg: white;
    --footer-bg: rgba(0, 0, 0, 0.1);
    
    /* Text Colors */
    --text-primary: #333;
    --text-secondary: #666;
    --text-white: white;
    --text-muted: rgba(255, 255, 255, 0.9);
    
    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.2);
    --border-card: rgba(255, 255, 255, 0.2);
    
    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-accent: rgba(76, 175, 80, 0.3);
    
    /* Button Colors */
    --btn-discord: #5865F2;
    --btn-discord-hover: #4752C4;
    --btn-tiktok: #000;
    --btn-tiktok-hover: #333;
    --btn-filter-bg: rgba(255, 255, 255, 0.1);
    --btn-filter-hover: rgba(255, 255, 255, 0.2);
    --btn-filter-active: var(--accent-color);
    
    /* Code Colors */
    --code-bg: #f0f0f0;
    --code-hover-bg: var(--accent-color);
    --code-text: var(--text-secondary);
    --code-hover-text: var(--text-white);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    min-height: 100vh;
}

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

/* Logo styling */
.logo {
    height: 5.5rem;
    width: auto;
    margin-right: 1rem;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Header */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-white);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
}

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

/* Search section */
.search-section {
    margin-bottom: 3rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    background: var(--card-bg);
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 6px 30px var(--shadow-medium);
    transform: translateY(-2px);
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-light);
    background: var(--btn-filter-bg);
    color: var(--text-white);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: var(--btn-filter-hover);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--btn-filter-active);
    border-color: var(--btn-filter-active);
    box-shadow: 0 4px 15px var(--shadow-accent);
}

/* Realms grid */
.realms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.realm-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 30px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-card);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.realm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800, #9C27B0);
}

.realm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.realm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.realm-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.realm-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.realm-status i {
    margin-right: 0.4rem;
    font-size: 0.7rem;
}

.realm-status.alive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.realm-status.dead {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.realm-status.invalid {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.realm-status.unknown {
    background: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.realm-code-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.realm-code-link:hover {
    transform: translateY(-2px);
}

.realm-code {
    background: var(--code-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--code-text);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    cursor: pointer;
}

.realm-code-link:hover .realm-code {
    background: var(--code-hover-bg);
    color: var(--code-hover-text);
    box-shadow: 0 4px 15px var(--shadow-accent);
}

.realm-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.realm-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.link-btn i {
    margin-right: 0.5rem;
}

.link-btn.discord {
    background: var(--btn-discord);
    color: var(--text-white);
}

.link-btn.discord:hover {
    background: var(--btn-discord-hover);
    transform: translateY(-2px);
}

.link-btn.tiktok {
    background: var(--btn-tiktok);
    color: var(--text-white);
}

.link-btn.tiktok:hover {
    background: var(--btn-tiktok-hover);
    transform: translateY(-2px);
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-white);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-white);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-white);
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .realms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .realm-card {
        padding: 1.5rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .realm-links {
        flex-direction: column;
    }
    
    .link-btn {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-box input {
        font-size: 1rem;
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
}

