/**
 * MuDream Template - Core Styles
 * Adapted for WebEngine CMS
 * Based on mudream.online design
 */

/* ======== RESET & BASE STYLES ======== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Circe', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

body.theme-red {
    --primary-color: #ff6b00;
    --primary-hover: #e55a00;
    --secondary-color: #4fc3f7;
    --accent-color: #ffce66;
    --success-color: #5cb85c;
    --danger-color: #d9534f;
    --warning-color: #f0ad4e;
    --info-color: #5bc0de;
    --dark-bg: rgba(0, 0, 0, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ======== TYPOGRAPHY ======== */
@font-face {
    font-family: 'Circe';
    src: url('../img/fonts/Circe/Circe-Regular.woff2') format('woff2'),
         url('../img/fonts/Circe/Circe-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../img/fonts/Montserrat/Montserrat-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../img/fonts/Montserrat/Montserrat-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

h2 {
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ======== UTILITY CLASSES ======== */
.flex {
    display: flex;
}

.flex.inline {
    display: inline-flex;
}

.flex.no-gap {
    gap: 0;
}

.flex.tiny-gap {
    gap: 0.25rem;
}

.flex.small-gap {
    gap: 0.5rem;
}

.flex.large-gap {
    gap: 1.5rem;
}

.flex.big-gap {
    gap: 2rem;
}

.flex.full-height {
    height: 100%;
}

.flex.relative {
    position: relative;
}

.flex.a-center {
    align-items: center;
}

.flex.a-start {
    align-items: flex-start;
}

.flex.j-center {
    justify-content: center;
}

.flex.j-between {
    justify-content: space-between;
}

.flex.j-row-nowrap {
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.flex.f-col-nowrap {
    flex-direction: column;
    flex-wrap: nowrap;
}

.flex.f-row-wrap {
    flex-direction: row;
    flex-wrap: wrap;
}

.grid {
    display: grid;
}

.grid.no-gap {
    gap: 0;
}

.grid.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid.col-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ======== ICONS ======== */
.icon {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
    vertical-align: middle;
}

.icon.sm {
    width: 1rem;
    height: 1rem;
}

.icon.lg {
    width: 2rem;
    height: 2rem;
}

.icon.xl {
    width: 2.5rem;
    height: 2.5rem;
}

/* ======== BUTTONS ======== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 0.5rem;
    white-space: nowrap;
    user-select: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-blue {
    background: linear-gradient(135deg, var(--secondary-color), #29b6f6);
    color: #ffffff;
}

.btn-blue:hover {
    background: linear-gradient(135deg, #29b6f6, var(--secondary-color));
    color: #ffffff;
}

.btn-yellow {
    background: linear-gradient(135deg, var(--accent-color), #ffc107);
    color: #000000;
}

.btn-yellow:hover {
    background: linear-gradient(135deg, #ffc107, var(--accent-color));
    color: #000000;
}

.btn-green {
    background: linear-gradient(135deg, var(--success-color), #66bb6a);
    color: #ffffff;
}

.btn-green:hover {
    background: linear-gradient(135deg, #66bb6a, var(--success-color));
    color: #ffffff;
}

.btn-red {
    background: linear-gradient(135deg, var(--danger-color), #ef5350);
    color: #ffffff;
}

.btn-red:hover {
    background: linear-gradient(135deg, #ef5350, var(--danger-color));
    color: #ffffff;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

.btn-left-icon {
    margin-right: 0.25rem;
}

.btn-right-icon {
    margin-left: 0.25rem;
}

/* ======== ONLINE BADGES ======== */
.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.online-badge-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.online-badge.online .online-badge-badge {
    background: var(--success-color);
}

.online-badge.offline .online-badge-badge {
    background: var(--danger-color);
}

.online-badge-lbl {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(92, 184, 92, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0);
    }
}

/* ======== FORMS ======== */
.select {
    position: relative;
    display: inline-block;
}

.select-custom {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
}

.select-rounded {
    border-radius: 12px;
}

.select-secondary {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.3);
}

.select-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.select-options-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    overflow: hidden;
    z-index: 1000;
    display: none;
}

.select:hover .select-options-list,
.select:focus-within .select-options-list {
    display: block;
}

.select-option {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.select-option:hover {
    background: var(--glass-bg);
    color: #ffffff;
}

.select-option.active {
    background: var(--secondary-color);
    color: #ffffff;
}

/* ======== RESPONSIVE DESIGN ======== */
@media (max-width: 1200px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .grid.col-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .flex.f-row-wrap {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ======== SCROLLBAR ======== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}