/* cyrillic-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/montserrat-500-vietnamese.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/montserrat-500-vietnamese.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/montserrat-500-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/montserrat-500-vietnamese.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/montserrat-500-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-color: #0f0f12;
    --bg-card: #1a1a20;
    --bg-secondary: #252530;

    --primary-color: #8b5cf6; /* Purple */
    --primary-hover: #7c3aed;
    --primary-light: rgba(139, 92, 246, 0.15);

    --text-main: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --border-radius: 16px;
    --border-color: #2d2d3a;

    /* Footer Colors */
    --footer-bg: #0a0a0c;
    --footer-text: #9ca3af;
    --footer-heading: #ffffff;
    --footer-placeholder: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    width: 100%;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 40px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.online-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 700;
}

.online-label {
    color: var(--primary-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    min-width: 200px;
    transition: all 0.3s ease;
}

.online-label.server-status-label {
    border-color: inherit;
    background-color: var(--bg-secondary);
}

.online-label::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    display: none;
}

.ip-box {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.ip-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.ip-box span {
    color: var(--text-muted);
    font-size: 12px;
    margin-right: 5px;
}

/* --- Main Layout --- */
.main-content {
    display: flex;
    gap: 40px;
    padding-bottom: 60px;
}

/* --- Sidebar --- */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.category-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-left: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-item:hover {
    transform: translateY(-2px);
    color: var(--text-main);
    background-color: var(--bg-card);
    border-color: var(--primary-color);
}

.category-item.active {
    background-color: var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* --- Content Area --- */
.content {
    flex-grow: 1;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.content-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
}

.history-btn {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.history-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.history-btn:active {
    transform: translateY(0);
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    border-color: var(--primary-color);
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    position: relative;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--text-main);
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.price-block {
    display: flex;
    flex-direction: column;
}

.price-prefix {
    font-size: 10px;
    color: var(--text-muted);
}

.price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
}

.buy-btn {
    background-color: var(--primary-color);
    color: var(--text-main);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.buy-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.5);
}

.buy-btn:active {
    transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0;
    font-size: 12px;
    line-height: 1.6;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-branding {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.footer-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
}

.footer-brand-info h3 {
    color: var(--footer-heading);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
}

.footer-brand-info p {
    font-size: 11px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.vk-placeholder {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #0077ff;
    border-radius: 4px;
    text-align: center;
    line-height: 20px;
    font-size: 8px;
    color: white;
    cursor: pointer;
}

.payment-methods-icons {
    display: flex;
    gap: 10px;
}

.pay-icon-placeholder {
    width: 45px;
    height: 25px;
    background-color: var(--footer-placeholder);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 700;
    border: 1px solid var(--border-color);
}

.footer-heading {
    color: var(--footer-heading);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-list a:hover {
    color: var(--primary-color);
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    width: 90%;
    max-width: 700px; /* Increased max-width for better layout */
    max-height: 90vh;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden; /* Prevent animating elements from overflowing */
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.modal-close:hover {
    color: var(--text-main);
    border-color: var(--primary-color);
    transform: rotate(90deg);
}

/* --- Modal Layout (Grid for Side-by-Side) --- */
.modal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    width: 100%;
}

.modal-dynamic-area {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    position: relative;
}

/* --- Modal Step Animations --- */
.modal-step {
    grid-area: 1 / 1;
    width: 100%;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

/* Animation forward (Step 1 -> Step 2) */
.modal-step.exiting {
    opacity: 0;
    transform: translateX(-50px);
    pointer-events: none;
}

.modal-step.entering {
    transform: translateX(50px);
    opacity: 0;
}

/* Animation backward (Step 2 -> Step 1) */
.modal-step.exiting-reverse {
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
}

.modal-step.entering-reverse {
    transform: translateX(-50px);
    opacity: 0;
}

/* --- Common Modal Elements --- */
.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
    min-height: 35px; /* Ensures consistent height when back button exists */
}

.modal-back {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.modal-back:hover {
    color: var(--text-main);
    border-color: var(--primary-color);
    background: var(--bg-card);
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

/* --- Product Info Sidebar --- */
.product-info-sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    align-self: start;
}

.product-info-sidebar .product-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: var(--bg-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info-sidebar .product-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.product-info-sidebar .product-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Step 1: Position Selection --- */
.positions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px; /* For scrollbar */
}

.position-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.position-option:hover {
    background-color: #2a2a35;
}

.position-option.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.position-option .position-name {
    font-weight: 700;
    font-size: 14px;
    flex-grow: 1;
}

.position-option .position-price {
    font-weight: 800;
    font-size: 16px;
    color: var(--primary-color);
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

/* --- Step 2: Purchase Form --- */
.purchase-form-content {
    display: flex;
    flex-direction: column;
}

.purchase-form-content .total-price {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.purchase-form-content .total-price strong {
    color: var(--primary-color);
    font-size: 20px;
}

#purchase-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #1a1a1a;
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- History Modal --- */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table th, .history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

.history-table td {
    color: var(--text-main);
    font-size: 14px;
}

.history-table tbody tr {
    transition: all 0.2s ease;
}

.history-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.status-badge {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.status-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.status-failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* --- Server Status --- */
/* Статус сервера отображается внутри .online-label */

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
    background-color: #a1a1aa;
    box-shadow: 0 0 8px rgba(161, 161, 170, 0.5);
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
    animation: none;
}

.status-indicator.error {
    background-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    animation: pulse 2s infinite;
}

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

.status-text {
    color: var(--text-main);
}

.server-status.online .status-text {
    color: #10b981;
}

.server-status.offline .status-text {
    color: #ef4444;
}

.server-status.error .status-text {
    color: #f59e0b;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.player-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.player-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #14b8a6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
    pointer-events: auto;
}

.toast.success {
    border-color: #10b981;
    background-color: #0f2e1c;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error {
    border-color: #ef4444;
    background-color: #2e0f0f;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info {
    border-color: #3b82f6;
    background-color: #0f1e2e;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast.warning {
    border-color: #f59e0b;
    background-color: #2e1f0f;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-main);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 8px 0;
    animation: progress linear;
}

.toast.success .toast-progress {
    background-color: #10b981;
}

.toast.error .toast-progress {
    background-color: #ef4444;
}

.toast.info .toast-progress {
    background-color: #3b82f6;
}

.toast.warning .toast-progress {
    background-color: #f59e0b;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.toast.remove {
    animation: slideOutRight 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
    }
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 15px;
        font-size: 12px;
    }

    .logo {
        font-size: 20px;
    }

    .container {
        padding: 15px;
    }

    .modal {
        padding: 20px;
    }

    .modal-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-info-sidebar {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
        padding: 15px;
    }

    .product-info-sidebar .product-icon {
        width: 60px;
        height: 60px;
        margin: 0;
        flex-shrink: 0;
    }

    .product-info-sidebar .product-description {
        margin: 0;
        font-size: 12px;
    }

    .step-header {
        margin-bottom: 15px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .card {
        padding: 10px;
    }

    .card-title {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .price {
        font-size: 14px;
    }

    .buy-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .online-label {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 160px;
    }

    .status-indicator {
        width: 6px;
        height: 6px;
    }

    .server-info {
        gap: 4px;
    }

    .status-text {
        font-size: 11px;
    }

    .player-bar {
        height: 3px;
    }

    .ip-box {
        padding: 8px 12px;
        font-size: 12px;
    }

    .category-item {
        padding: 12px 15px;
        font-size: 13px;
    }

    .history-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .content-header h1 {
        font-size: 18px;
    }

    .modal-title {
        font-size: 18px;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        padding: 12px;
    }

    .toast-icon {
        font-size: 16px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }

    .history-table th, .history-table td {
        padding: 10px;
        font-size: 12px;
    }

    .status-badge {
        padding: 5px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 10px 0 20px 0;
    }

    .logo {
        font-size: 18px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
        font-size: 11px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card {
        padding: 8px;
    }

    .card-title {
        font-size: 11px;
    }

    .price-prefix {
        font-size: 9px;
    }

    .price {
        font-size: 13px;
    }

    .card-footer {
        gap: 5px;
    }

    .buy-btn {
        padding: 6px 10px;
        font-size: 10px;
    }

    .online-label {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 150px;
    }

    .ip-box {
        padding: 6px 10px;
        font-size: 11px;
    }

    .modal {
        padding: 15px;
        border-radius: 12px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .form-group input {
        padding: 10px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }

    .category-item {
        padding: 10px 12px;
        font-size: 12px;
    }

    .history-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .content-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .content-header h1 {
        font-size: 16px;
    }

    .toast {
        min-width: auto;
        padding: 10px;
    }

    .toast-icon {
        font-size: 14px;
    }

    .toast-title {
        font-size: 12px;
    }

    .toast-message {
        font-size: 11px;
    }

    .history-table {
        font-size: 11px;
    }

    .history-table th, .history-table td {
        padding: 8px 5px;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
    }

    .footer-col {
        min-width: auto;
    }
}

/* --- Status Loader Animation --- */
.status-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

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

@media (prefers-reduced-motion: reduce) {
    .status-loader {
        animation: none;
        border-top-color: rgba(139, 92, 246, 0.6);
    }
}
