/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --bg-card-hover: #252525;

    /* Accent Colors */
    --accent-gold: #d4a853;
    --accent-gold-light: #e8c778;
    --accent-gold-dark: #b8923d;
    --accent-orange: #f59e0b;
    --accent-orange-light: #fbbf24;

    /* Status Colors */
    --status-online: #22c55e;
    --accent-pink: #ec4899;
    --status-offline: #ef4444;
    --status-loading: #6b7280;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #6b7280;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(212, 168, 83, 0.3);

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow-gold: 0 0 40px rgba(212, 168, 83, 0.15);
    --shadow-glow-orange: 0 0 40px rgba(245, 158, 11, 0.15);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}



/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ==========================================
   Animated Background
   ========================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg,
            var(--bg-primary) 0%,
            #0f1419 25%,
            #0d1117 50%,
            #161b22 75%,
            var(--bg-primary) 100%);
    background-size: 400% 400%;
    animation: gradient-shift 45s ease infinite;
    z-index: -2;
}

#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Let clicks pass through for now, or handle in JS if needed */
}



@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ==========================================
   Layout
   ========================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Header
   ========================================== */
.header {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.header-controls {
    position: absolute;
    top: var(--spacing-lg);
    right: 0;
}



.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.logo-icon {
    font-size: 2.5rem;
    text-shadow: 0 0 20px var(--accent-gold);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo .accent {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent-orange);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ==========================================
   Projects Grid
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    flex: 1;
    perspective: 1000px;
}

/* ==========================================
   Project Card with 3D Tilt
   ========================================== */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow-gold);
}

.project-card:hover::before {
    opacity: 1;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
}

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.mikesbar-icon {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(212, 168, 83, 0.1));
    color: var(--accent-gold);
    border: 1px solid rgba(212, 168, 83, 0.3);
    animation: logo-glow 2s ease-in-out infinite;
}

@keyframes logo-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(212, 168, 83, 0.3), 0 0 20px rgba(212, 168, 83, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(212, 168, 83, 0.5), 0 0 40px rgba(212, 168, 83, 0.2);
    }
}

.signage-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.signagev2-icon {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(147, 51, 234, 0.1));
    color: #a855f7;
    border: 1px solid rgba(147, 51, 234, 0.3);
    animation: logo-glow-purple 2s ease-in-out infinite;
}

@keyframes logo-glow-purple {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(147, 51, 234, 0.3), 0 0 20px rgba(147, 51, 234, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5), 0 0 40px rgba(147, 51, 234, 0.2);
    }
}

.signage-local-icon {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(147, 51, 234, 0.1));
    color: #a855f7;
    border: 1px solid rgba(147, 51, 234, 0.3);
    animation: logo-glow-purple 2s ease-in-out infinite;
}

.licensepro-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.1));
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    animation: logo-glow-green 2s ease-in-out infinite;
}

@keyframes logo-glow-green {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3), 0 0 20px rgba(34, 197, 94, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.2);
    }
}

/* Managed By Hint - Green for LicensePRO */
.managed-by-hint {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(34, 197, 94, 0.08);
    border: 1px dashed rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.managed-by-hint svg {
    color: #22c55e;
    flex-shrink: 0;
}

.managed-by-hint strong {
    color: #22c55e;
    font-weight: 600;
}

/* V2 accent text - Purple */
.accent-pro {
    background: linear-gradient(135deg, #a855f7, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* LicensePRO accent text - Green */
.accent-green {
    background: linear-gradient(135deg, #22c55e, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}



.project-info h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.01em;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(212, 168, 83, 0.2);
    color: var(--accent-gold);
    border-radius: var(--radius-sm);
}

.badge.orange {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-orange);
}

.badge.gray {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-muted);
}

.badge.purple {
    background: rgba(147, 51, 234, 0.2);
    color: #a855f7;
}

.badge.pink {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
}

/* Gallery Icon - Pink */
.gallery-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.1));
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.3);
    animation: logo-glow-pink 2s ease-in-out infinite;
}

@keyframes logo-glow-pink {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.3), 0 0 20px rgba(236, 72, 153, 0.1);
    }

    50% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.5), 0 0 40px rgba(236, 72, 153, 0.2);
    }
}

/* Pink accent text */
.accent-pink {
    color: #ec4899;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Project Description */
.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    min-height: 5.5em;
}

/* Project Links */
.project-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Project Preview Image */
.project-preview {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.project-preview:hover .preview-image {
    transform: scale(1.02);
}

.link-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.link-btn:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: var(--accent-gold);
}

.link-btn .arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.link-btn:hover .arrow {
    transform: translateX(4px);
    color: var(--accent-gold);
}

/* Card Footer - Status */
.card-footer {
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Status History Graph */
.status-history {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 20px;
}

.history-bar {
    width: 4px;
    border-radius: 1px;
    transition: all var(--transition-fast);
    background: var(--status-loading);
}

.history-bar.online {
    background: var(--status-online);
}

.history-bar.offline {
    background: var(--status-offline);
}

.history-bar:hover {
    transform: scaleY(1.2);
}

/* Status Indicator with Tooltip */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    cursor: pointer;
}

.status-indicator:hover .status-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--status-loading);
    position: relative;
}

.status-dot.online {
    background: var(--status-online);
    box-shadow: 0 0 10px var(--status-online);
    animation: pulse-online 2s infinite;
}

.status-dot.offline {
    background: var(--status-offline);
    box-shadow: 0 0 10px var(--status-offline);
}

.status-dot.loading {
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-online {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

@keyframes pulse-loading {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Status Tooltip */
.status-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: var(--spacing-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all var(--transition-fast);
    z-index: 100;
    box-shadow: var(--shadow-card);
}

.status-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: var(--bg-card);
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: var(--spacing-xs) 0;
}

.tooltip-row:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}

.tooltip-label {
    color: var(--text-muted);
}

.tooltip-value {
    color: var(--text-primary);
    font-weight: 500;
}

.tooltip-value.good {
    color: var(--status-online);
}

.tooltip-value.bad {
    color: var(--status-offline);
}

/* ==========================================
   Coming Soon Card
   ========================================== */
.project-card.coming-soon {
    border-style: dashed;
    opacity: 0.7;
    background: transparent;
}

.project-card.coming-soon:hover {
    opacity: 1;
    background: var(--bg-card);
}

.coming-soon-icon {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
    border: 1px dashed var(--text-muted);
}

.coming-soon-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: var(--spacing-lg) 0;
}

/* ==========================================
   Legacy Projects Section
   ========================================== */
.legacy-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-subtle);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    max-width: 800px;
    margin: 0 auto;
}

.legacy-card {
    opacity: 0.6;
    filter: grayscale(30%);
    transition: all var(--transition-normal);
}

.legacy-card:hover {
    opacity: 0.85;
    filter: grayscale(0%);
}

.deprecated-badge {
    margin-left: var(--spacing-xs);
}

.deprecated-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-top: var(--spacing-sm);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg);
    }

    .header-controls {
        position: static;
        margin-bottom: var(--spacing-md);
        display: flex;
        justify-content: center;
    }

    .header {
        min-height: 120px;
    }

    .logo {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .logo h1 {
        font-size: 1.5rem;
        text-align: center;
        line-height: 1.4;
    }

    .logo .accent {
        display: block;
        min-height: 2.2rem;
    }

    .typing-text {
        display: inline-block;
        min-width: 180px;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: var(--spacing-lg);
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--spacing-sm);
    }

    .status-history {
        order: -1;
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-icon {
        width: 48px;
        height: 48px;
    }

    .project-info h2 {
        font-size: 1.2rem;
    }

    .theme-toggle-text {
        display: none;
    }
}