/* ========================================
   Main Styles - Personal Projects Hub
   Asymmetrical Modern Theme with Sharp Angles
   Color Palette: Green, Light Blue, Purple, Red Accent
   ======================================== */

/* CSS Reset & Variables */
:root {
    /* Primary Colors */
    --emerald-green: #10b981;
    --sky-blue: #38bdf8;
    --coral-red: #ef4444;
    --violet-purple: #a855f7;

    /* Neutral Colors */
    --deep-charcoal: #007488;
    --slate-gray: #16201b;
    --cool-gray: #64748b;
    --pure-white: #ffffff;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--emerald-green) 0%, var(--sky-blue) 50%, var(--violet-purple) 100%);
    --accent-gradient: linear-gradient(135deg, var(--coral-red) 0%, var(--violet-purple) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    /* Transitions - Subtle */
    --transition-subtle: 0.15s ease;
    --transition-normal: 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--deep-charcoal);
    color: var(--pure-white);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   Welcome Section - Diagonal Split
   ======================================== */
header#welcome-section {
    position: relative;
    margin-bottom: 60px;
    overflow: hidden;
}

.welcome-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 96%);
}

.welcome-left {
    background: linear-gradient(135deg, var(--emerald-green) 0%, rgba(16, 185, 129, 0.7) 100%);
    padding: 60px 40px;
    display: flex;
    align-items: center;
}

.welcome-right {
    background: linear-gradient(135deg, var(--violet-purple) 0%, rgba(168, 85, 247, 0.7) 100%);
    padding: 60px 40px;
    display: flex;
    align-items: center;
}

.welcome-content {
    text-align: left;
}

header#welcome-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    line-height: 1.1;
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Decorative geometric shape */
.welcome-decor {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.welcome-decor.left {
    right: -20px;
    top: 20px;
}

.welcome-decor.right {
    left: -20px;
    bottom: 20px;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* CSS-drawn indicator shapes (no emojis) */
.indicator-shape {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.indicator-circle {
    background-color: var(--emerald-green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.indicator-square {
    background-color: var(--coral-red);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ========================================
   Server Status Section - Floating Cluster
   ======================================== */
.server-section {
    margin-bottom: 60px;
}

.server-status-container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.status-card {
    background: var(--slate-gray);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 320px;
    box-shadow: var(--shadow-md);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
    transition: transform var(--transition-subtle), box-shadow var(--transition-subtle);
}

.status-card:hover {
    transform: skewX(-1deg);
    box-shadow: var(--shadow-lg);
}

.status-indicator {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.status-indicator.online {
    background-color: var(--emerald-green);
    border-radius: 50%;
    animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-indicator.offline {
    background-color: var(--coral-red);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.status-info .server-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-info .server-motd {
    color: var(--cool-gray);
    font-style: italic;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.status-info .player-count {
    color: var(--sky-blue);
    font-weight: 600;
    font-size: 1rem;
}

/* Angled copy button */
.btn-copy {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--coral-red), var(--violet-purple));
    color: white;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 88%);
    transition: opacity var(--transition-subtle), transform var(--transition-subtle);
}

.btn-copy:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========================================
   Games Section - Asymmetrical Masonry
   ======================================== */
.games-section {
    margin-bottom: 60px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-flow: dense;
    gap: 24px;
}

/* Featured card takes more space */
.game-card.featured {
    grid-row: span 2;
}

.game-card {
    background: var(--slate-gray);
    padding: 28px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.game-card:hover {
    transform: translateY(-3px) skewX(-1deg);
    box-shadow: var(--shadow-lg);
}

/* Geometric shape instead of emoji */
.game-icon-shape {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-icon-shape::after {
    content: '';
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--pure-white);
    font-weight: 600;
}

.game-card p {
    color: var(--cool-gray);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-play {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--sky-blue), var(--violet-purple));
    color: white;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 88%);
    transition: opacity var(--transition-subtle), transform var(--transition-subtle);
}

.btn-play:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========================================
   Modal System - Angled Entry
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--slate-gray);
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--pure-white);
}

.btn-close {
    background: none;
    border: none;
    color: var(--cool-gray);
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-subtle);
    padding: 0;
}

.btn-close:hover {
    color: var(--coral-red);
}

.game-frame-container {
    width: 100%;
    height: calc(90vh - 80px);
    overflow: auto;
    background: #0a0a15;
}

/* ========================================
   Footer
   ======================================== */
footer#footer-section {
    text-align: center;
    padding: 40px;
    color: var(--cool-gray);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
}

/* ========================================
   Loading State - Subtle Spinner
   ======================================== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--sky-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Error State - Red Accent (Informative)
   ======================================== */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--coral-red);
    color: var(--pure-white);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

/* ========================================
   Scrollbar Styling - Subtle
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-charcoal);
}

::-webkit-scrollbar-thumb {
    background: var(--cool-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sky-blue);
}

/* ========================================
   Responsive Design - Subtle Adjustments
   ======================================== */
@media (max-width: 1024px) {
    .welcome-split-container {
        grid-template-columns: 1fr;
    }
    
    .welcome-left,
    .welcome-right {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    header#welcome-section h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .server-status-container {
        flex-direction: column;
    }
    
    .status-card {
        min-width: auto;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
}
