:root {
    --dark-1: #0D0D0D;
    --dark-2: #1A1A1A;
    --accent: #2ECC71;
    --text: #E6E6E6;
    --border: rgba(255,255,255,0.08);
}

/* Важное добавление - box-sizing для всех элементов */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--dark-1);
    color: var(--text);
    font-family: 'Inter', system-ui;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden; /* Защита от горизонтального скролла */
}

.multiplier-box {
    background: var(--dark-2);
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
    position: relative;
}

h2 {
    color: var(--accent);
    text-align: center;
    margin: 0 0 2rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: #121212;
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0; /* Сброс стандартных отступов */
}

input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
    outline: none;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25);
}

.admin-stats {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--dark-1);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.admin-stats h3 {
    color: var(--accent);
    margin: 0 0 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-stats h3::before {
    content: '🔒';
    font-size: 1.1em;
}

.stat-item {
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.4s ease;
}

.alert.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ECC71;
    color: #2ECC71;
}

.alert.error {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid #FF3B30;
    color: #FF3B30;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    margin-top: 2rem;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 0.8;
}

.workshop-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.panel-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent);
}

.resources-panel {
    background: var(--dark-1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.resource-card {
    background: var(--dark-2);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.resource-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.conversion-flow {
    background: var(--dark-1);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.conversion-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
}

.conversion-step .resource-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.5rem 0;
}

.conversion-step .resource-item img {
    width: 24px;
    height: 24px;
}

.conversion-arrow {
    font-size: 2em;
    color: var(--accent);
    margin: 1rem 0;
    animation: pulse 1.5s infinite;
}

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

.action-button {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: var(--dark-1);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #333;
}

.action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.3);
}

.poison-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent);
}

.poison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.poison-card {
    background: var(--dark-1);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.poison-card:hover {
    transform: translateY(-5px);
}

.poison-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.buy-options {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.8rem;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: var(--dark-1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #333;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.currency-icon {
    width: 20px;
    height: 20px;
}

.navigation {
    margin-top: 2rem;
    text-align: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-item.active .page-link {
    background: var(--accent);
    color: var(--dark-1);
    border-color: var(--accent);
    font-weight: 500;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    border-color: transparent;
}

.notification {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ECC71;
    color: #2ECC71;
}

.notification-error {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid #FF3B30;
    color: #FF3B30;
}

.skill-card {
    background: var(--dark-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.progress-container {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ECC71, #27AE60);
    width: 100%; /* Исправлено с '%' на '100%' */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.upgrade-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
}

.header-block {
    background: var(--dark-1);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-title {
    font-size: 2.2rem;
    color: var(--accent);
    text-shadow: 0 2px 8px rgba(46, 204, 113, 0.4);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.game-image {
    border: 2px solid var(--border);
    border-radius: 12px;
    margin: 1.5rem 0;
    width: 220px;
    height: 140px;
    object-fit: cover;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.game-stats {
    color: #909090;
    margin: 1.5rem 0;
    font-size: 1.1em;
    position: relative;
    z-index: 2;
}

.btn-primary {
    display: inline-block;
    padding: 18px 45px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: var(--dark-1);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.3em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.15),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(46, 204, 113, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary::after {
    content: '▶';
    margin-left: 12px;
    font-size: 0.9em;
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-primary:hover::after {
    transform: translateX(4px);
}

.auth-form {
    max-width: 320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    margin: 10px 0;
    background: #121212;
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: all 0.3s ease;
    font-size: 1em;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    color: var(--dark-1);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 1rem 0;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(46, 204, 113, 0.2);
    transform: translateY(-1px);
}

.divider {
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
    opacity: 0.3;
}

@media (max-width: 640px) {
    .multiplier-box {
        margin: 1rem;
        padding: 1.5rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    input[type="number"] {
        padding: 10px 14px;
    }
    .resource-grid {
        grid-template-columns: 1fr;
    }
    .workshop-container {
        padding: 1rem;
    }
    .poison-card {
        padding: 1rem;
    }
    .page-link {
        padding: 0.4rem 0.8rem;
    }
    .game-title {
        font-size: 1.8rem;
    }
    .game-image {
        width: 180px;
        height: 120px;
    }
    .btn-primary {
        padding: 16px 36px;
        font-size: 1.1em;
    }
}