/**
 * universesigna.com Custom Styles
 *
 * Tailwind CSS handles most styling (local build, GDPR compliant).
 * This file contains custom overrides and animations.
 *
 * @author Adam Bartko (ZEDc)
 */

/* ============================================
   CUSTOM FONTS
   ============================================ */

@font-face {
    font-family: 'Righteous';
    src: url('/css/fonts/Righteous-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   COSMIC BACKGROUND
   ============================================ */

.bg-cosmic-gradient {
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #0F172A 100%);
}

/* Layered stars with twinkle */
.bg-stars {
    position: relative;
}

.bg-stars::before,
.bg-stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* First star layer - small stars */
.bg-stars::before {
    background-image:
        radial-gradient(1px 1px at 10px 10px, white, transparent),
        radial-gradient(1px 1px at 150px 150px, white, transparent),
        radial-gradient(1px 1px at 300px 50px, white, transparent),
        radial-gradient(1.5px 1.5px at 80px 200px, white, transparent),
        radial-gradient(1px 1px at 200px 100px, rgba(255,255,255,0.8), transparent);
    background-size: 400px 400px;
    animation: twinkle 3s ease-in-out infinite;
}

/* Second star layer - larger, dimmer stars */
.bg-stars::after {
    background-image:
        radial-gradient(2px 2px at 50px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 250px 200px, rgba(139,92,246,0.4), transparent),
        radial-gradient(1.5px 1.5px at 180px 30px, rgba(255,255,255,0.5), transparent);
    background-size: 500px 500px;
    animation: twinkle 4s ease-in-out infinite;
    animation-delay: 1s;
}

/* Twinkle animation */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Particles.js container - FULL PAGE background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    /* Allow interaction but let clicks pass through to content */
    pointer-events: auto;
    background: linear-gradient(180deg, #0F172A 0%, #1E1B4B 50%, #0F172A 100%);
}

/* Ensure content is above particles and clickable */
main, footer {
    position: relative;
    z-index: 1;
}

/* Navigation - sticky at top, above particles */
nav {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Cookie banner above everything */
#cookie-consent {
    z-index: 50;
}

/* ============================================
   TRUST LEVEL BADGES
   ============================================ */

.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cosmic tier badges (for homepage tier cards) */
.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
    border-radius: 9999px;
    color: white;
}

.level-1 { background: #6B7280; } /* Gray */
.level-2 { background: #10B981; } /* Green */
.level-3 { background: #3B82F6; } /* Blue */
.level-4 { background: #8B5CF6; } /* Purple */
.level-5 { background: #F59E0B; } /* Amber */
.level-6,
.level-7,
.level-8,
.level-9,
.level-10 {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
} /* Gold gradient for high levels */

/* ============================================
   SOCIAL CONNECT BUTTONS
   ============================================ */

.btn-steam {
    background: #171a21;
    color: white;
}
.btn-steam:hover {
    background: #2a475e;
}

.btn-discord {
    background: #5865F2;
    color: white;
}
.btn-discord:hover {
    background: #4752C4;
}

.btn-twitter {
    background: #000000;
    color: white;
}
.btn-twitter:hover {
    background: #333333;
}

.btn-facebook {
    background: #1877F2;
    color: white;
}
.btn-facebook:hover {
    background: #166fe5;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    }
}

.glow-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.card-hover:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* ============================================
   FORM INPUTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ============================================
   TABLES (Admin)
   ============================================ */

.table-admin {
    width: 100%;
    border-collapse: collapse;
}

.table-admin th,
.table-admin td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.table-admin th {
    background: rgba(15, 23, 42, 0.8);
    font-weight: 600;
    color: #9CA3AF;
}

.table-admin tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .card {
        padding: 1rem;
    }

    /* Make tables more readable on mobile */
    .table-admin th,
    .table-admin td {
        padding: 0.5rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Hide less important columns on mobile */
    .hide-mobile {
        display: none;
    }

    /* Stack form elements */
    .form-row-mobile {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Smaller buttons on mobile */
    .btn-mobile-small {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Scrollable container for long content */
.scrollable-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Truncate long text */
.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Mobile-first visibility */
@media (min-width: 768px) {
    .hide-desktop {
        display: none;
    }
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none;
    }
}

/* ============================================
   ADMIN REPORTS COMPACT UI
   ============================================ */

.admin-reports-project-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(2, 6, 23, 0.7);
    color: #9ca3af;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-reports-project-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.45);
}

.admin-reports-project-card {
    overflow: hidden;
    transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.admin-reports-project-card:hover {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.16);
}

.admin-reports-project-section {
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.875rem;
    background: rgba(2, 6, 23, 0.4);
    padding: 0.85rem 0.95rem;
}

.admin-reports-qa-menu {
    right: 0;
    width: min(18rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
}

/* Compact shared QA banner so it interferes less with in-page controls. */
.qa-banner {
    gap: 0.75rem;
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
}

.qa-banner__controls {
    gap: 0.375rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qa-banner__timer {
    font-size: 0.75rem;
}

.qa-banner__select,
.qa-banner__exit,
.qa-banner__switch-submit {
    min-height: 38px;
    font-size: 0.75rem;
}

.qa-banner__select {
    padding: 0.35rem 0.625rem;
}

.qa-banner__exit {
    min-width: 108px;
    padding: 0.4rem 0.875rem;
}

.qa-banner__switch-submit {
    padding: 0.35rem 0.625rem;
}

@media (max-width: 640px) {
    .admin-reports-project-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-reports-project-section {
        padding: 0.75rem 0.85rem;
    }

    .admin-reports-qa-menu {
        width: min(18rem, calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
    }

    .qa-banner {
        padding: 0.5rem 0.75rem;
    }
}
