@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Modern Palette */
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary-color: #ec4899;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    --bg-input: rgba(15, 23, 42, 0.6);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-color: rgba(148, 163, 184, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08), transparent 25%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Navigation --- */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #f472b6, #a78bfa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    animation: gradientShift 5s linear infinite, subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.85; filter: brightness(1.2); }
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: white;
}

.auth-buttons, .user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* --- Buttons --- */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-warning {
    background: var(--warning-color);
    color: #1e1e1e;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-muted);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    position: relative;
    overflow: hidden;
}

#heroBrand {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #a78bfa, #f472b6, #a78bfa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite, fadeInDown 0.425s ease-out backwards;
}

#heroWelcome {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.425s ease-out backwards;
    animation-delay: 1.275s;
}

#heroSubtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeIn 0.425s ease-out backwards;
    animation-delay: 1.87s;
}

.hero-buttons {
    animation: fadeInUp 0.68s ease-out backwards;
    animation-delay: 2.72s;
}

/* Animations Keyframes */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Star Button Effect */
.star-btn {
    position: relative;
    z-index: 10;
}

.star-particle {
    position: absolute;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 35%, rgba(250, 232, 170, 0.95) 60%, rgba(139, 92, 246, 0.35) 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 71%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.85), 0 0 12px rgba(139, 92, 246, 0.55);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55));
    transform-origin: center;
    will-change: transform, opacity;
    z-index: 1200;
    opacity: 0;
}

/* --- Cards Grid --- */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0; 
}

/* Animations Triggered by JS */
.card.visible {
    opacity: 1;
}

.card.visible:nth-child(1) {
    animation: slideInLeft 0.5s ease-out forwards;
}

.card.visible:nth-child(2) {
    animation: slideInUp 0.5s ease-out forwards;
}

.card.visible:nth-child(3) {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Server Info Section Specifics */
#about h2 {
    text-align: center;
    width: 100%;
    animation: subtlePulse 3s ease-in-out infinite;
    color: var(--text-main);
}

.server-info-title-gradient {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #a78bfa, #f472b6, #a78bfa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s linear infinite;
    display: inline-block;
}


.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(139, 92, 246, 0.3);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
}

/* --- Server Info Beautiful Panel --- */
.server-info-display {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

/* Decorative background blur */
.server-info-display::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    opacity: 0.1;
    filter: blur(80px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.server-info-display > * {
    position: relative;
    z-index: 1;
}

.server-info-display h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.server-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

/* --- Posts & News --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.post-image {
    height: 180px;
    background-color: #2d3748;
    background-size: cover;
    background-position: center;
}

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

.post-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex: 1;
}

.post-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 3rem 0 6rem 0; /* Extra scroll space at bottom */
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.5));
}

.footer-content p {
    color: var(--text-muted);
    opacity: 0.6;
    font-size: 0.9rem;
}

.posts-admin-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.admin-post-item {
    padding: 1rem;
    background: var(--bg-input);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

/* --- Forms --- */
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.modal {
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border-color);
    position: relative;
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .posts-admin-container { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
}






