/* Nostalgic Retro Theme CSS */
/* Inspired by 90s web design aesthetics with vibrant colors, bold typography, and retro elements */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Press+Start+2P&family=Bungee&family=Fredoka+One:wght@400&display=swap');

:root {
    /* Custom Color Palette */
    --primary-color: #943535;          /* Primary red */
    --secondary-color: #FFFFFF;        /* White */
    --background-color: #2f3339;       /* Dark background */
    
    /* Derived colors for effects */
    --primary-light: #b54545;          /* Lighter primary */
    --primary-dark: #7a2a2a;           /* Darker primary */
    --background-light: #2f3339;       /* Lighter background */
    --background-dark: #1a1d22;        /* Darker background */
    
    /* Background colors */
    --retro-dark-bg: var(--background-color);     /* Main background */
    --retro-card-bg: var(--background-light);     /* Cards background */
    --retro-gradient-bg: linear-gradient(45deg, var(--background-color) 0%, var(--background-light) 25%, var(--background-dark) 50%, var(--background-light) 75%, var(--background-color) 100%);
    
    /* Text colors */
    --retro-text-primary: var(--secondary-color); /* White text */
    --retro-text-glow: var(--primary-color);      /* Primary glow text */
    --retro-text-accent: var(--primary-light);    /* Primary accent text */
    
    /* Border and effects */
    --retro-border-primary: 2px solid var(--primary-color);
    --retro-glow-primary: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    --retro-glow-light: 0 0 10px var(--primary-light), 0 0 20px var(--primary-light), 0 0 30px var(--primary-light);
    --retro-glow-white: 0 0 10px var(--secondary-color), 0 0 20px var(--secondary-color), 0 0 30px var(--secondary-color);
}

/* Global Body Styling */
body {
    background: var(--retro-gradient-bg);
    background-attachment: fixed;
    color: var(--retro-text-primary);
    font-family: 'Orbitron', monospace;
    position: relative;
    overflow-x: hidden;
}

/* Animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(148, 53, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(181, 69, 69, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(122, 42, 42, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--retro-font);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    animation: textGlow 2s ease-in-out infinite alternate;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-light);
}

h3 {
    font-size: 2rem;
    color: var(--secondary-color);
}

@keyframes textGlow {
    from { opacity: 1; }
    to { opacity: 0.8; }
}

/* Navigation Styling */
.grimlock-navigation,
.site-header {
    background: linear-gradient(90deg, var(--retro-dark-bg) 0%, var(--primary-dark) 50%, var(--retro-dark-bg) 100%);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(148, 53, 53, 0.5);
}

.grimlock-navigation .navbar-nav .nav-link {
    color: var(--retro-text-primary) !important;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.grimlock-navigation .navbar-nav .nav-link:hover,
.grimlock-navigation .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    background: rgba(148, 53, 53, 0.1);
    transform: scale(1.05);
}

/* Logo/Brand Styling */
.site-title,
.grimlock-site-identity .site-title a {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.02);
    }
}

/* Button Styling */
.btn,
.grimlock-button,
button,
input[type="submit"],
input[type="button"] {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-light));
    color: white;
    box-shadow: var(--retro-glow-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:hover,
.grimlock-button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-light));
    border-color: var(--primary-light);
    color: var(--secondary-color);
    box-shadow: var(--retro-glow-light);
    transform: translateY(-2px) scale(1.05);
}

/* Primary button variant */
.btn-primary,
.grimlock-button--primary {
    border-color: var(--primary-light);
    color: var(--primary-light);
    box-shadow: var(--retro-glow-light);
}

.btn-primary:hover,
.grimlock-button--primary:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
    border-color: var(--secondary-color);
    color: var(--retro-dark-bg);
    box-shadow: 0 0 20px var(--primary-light);
}

/* Card and Panel Styling */
.card,
.grimlock-section,
.widget,
.panel {
    background: linear-gradient(135deg, var(--retro-card-bg) 0%, rgba(47, 51, 57, 0.9) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 
        var(--retro-glow-primary),
        inset 0 0 20px rgba(148, 53, 53, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

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

/* Table Styling */
.table,
table {
    background: var(--retro-card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
}

.table th,
table th {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    color: var(--retro-text-primary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    padding: 1rem;
    border: 1px solid var(--primary-light);
}

.table td,
table td {
    color: var(--retro-text-primary);
    padding: 0.8rem;
    border: 1px solid var(--primary-color);
    font-family: 'Orbitron', monospace;
}

.table tr:hover,
table tr:hover {
    background: rgba(148, 53, 53, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Form Styling */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    background: rgba(47, 51, 57, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--retro-text-primary);
    font-family: 'Orbitron', monospace;
    padding: 0.8rem;
    box-shadow: inset 0 0 10px rgba(148, 53, 53, 0.2);
    transition: all 0.3s ease;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-light);
    box-shadow: 
        inset 0 0 10px rgba(148, 53, 53, 0.3),
        var(--retro-glow-light);
    outline: none;
}

/* Link Styling */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: bold;
}

a:hover {
    color: var(--primary-light);
    transform: translateY(-1px);
    text-decoration: none;
}


a:hover::after {
    width: 100%;
}

/* Footer Styling */
.site-footer,
footer {
    background: #1c1a23;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -5px 20px rgba(148, 53, 53, 0.3);
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--retro-text-primary);
    font-family: 'Orbitron', monospace;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--retro-dark-bg);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border-radius: 6px;
    box-shadow: var(--retro-glow-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
}

/* Retro Loading Animation */
.retro-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: var(--primary-light);
    animation: retroSpin 1s ease-in-out infinite;
    box-shadow: var(--retro-glow-primary);
}

@keyframes retroSpin {
    to { transform: rotate(360deg); }
}

/* Retro Grid Pattern Overlay */
.retro-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(148, 53, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 53, 53, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .grimlock-navigation .navbar-nav .nav-link {
        font-size: 0.6rem;
        padding: 0.6rem 1rem;
    }
    
    .btn,
    .grimlock-button {
        font-size: 0.6rem;
        padding: 0.6rem 1.2rem;
    }
    
    .site-title {
        font-size: 2rem;
    }
}

/* Special Effects for Gaming Elements */
.rank-item,
.player-stats,
.guild-info {
    position: relative;
    background: linear-gradient(135deg, var(--retro-card-bg), rgba(148, 53, 53, 0.3));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: var(--retro-glow-primary);
    transition: all 0.3s ease;
}

.rank-item:hover,
.player-stats:hover,
.guild-info:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 0 25px var(--primary-color),
        0 0 35px rgba(148, 53, 53, 0.3);
}

/* Gaming elements */
.health-bar,
.progress-bar {
    background: var(--retro-dark-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.health-bar::after,
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    width: var(--progress, 100%);
    box-shadow: var(--retro-glow-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Retro Badge Styling */
.badge,
.label {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: var(--retro-text-primary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    box-shadow: var(--retro-glow-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Retro Alert Styling */
.alert {
    border: 2px solid var(--primary-light);
    background: linear-gradient(135deg, rgba(181, 69, 69, 0.1), rgba(148, 53, 53, 0.1));
    color: var(--retro-text-primary);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(181, 69, 69, 0.3);
    font-family: 'Orbitron', monospace;
}

.alert-success {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(148, 53, 53, 0.1), rgba(122, 42, 42, 0.1));
    box-shadow: 0 0 15px rgba(148, 53, 53, 0.3);
}

.alert-danger {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(122, 42, 42, 0.1), rgba(148, 53, 53, 0.1));
    box-shadow: 0 0 15px rgba(122, 42, 42, 0.3);
}

/* ===== CENTERING AND LAYOUT IMPROVEMENTS ===== */

/* Center all main content sections */
.site-wrapper,
.site,
.grimlock-region,
.region__container,
.container,
.row,
section,
.content-area,
.main-content,
.page-content,
.entry-content {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Center specific content blocks */
.wp-block-group,
.wp-block-columns,
.wp-block-column,
.grimlock-section,
.widget,
.card,
.panel {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Center forms and form elements */
form,
.form-group,
.input-group,
.form-control {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Center navigation elements */
.navbar,
.nav,
.menu,
.navigation {
    text-align: center;
    justify-content: center;
}

/* Center tables */
table {
    margin-left: auto;
    margin-right: auto;
}

/* Center images and media */
img,
video,
iframe,
.media {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Instructions for developers */
/*
=== CENTERING INSTRUCTIONS ===

To center any new section or content block, apply one of these classes:

1. .center-content - Centers the element and its content
2. .center-block - Centers the block element only
3. .text-center - Centers text content only

Example usage:
<div class="center-content">
    <h2>Centered Title</h2>
    <p>Centered paragraph content</p>
</div>

For flexbox centering:
<div class="flex-center">
    <div>Centered flex item</div>
</div>

For grid centering:
<div class="grid-center">
    <div>Centered grid item</div>
</div>
*/

/* Utility classes for centering */
.center-content {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: block;
}

.center-block {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.text-center {
    text-align: center;
}

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

.grid-center {
    display: grid;
    place-items: center;
    justify-content: center;
}

/* Responsive centering */
@media (max-width: 768px) {
    .container,
    .row,
    .col {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}