* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #eee;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(138, 119, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Auth Screen */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container h1 {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    min-width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
    outline: none;
}

.auth-form input:focus {
    border-color: #667eea;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-form button:active {
    transform: translateY(0);
}

.admin-link {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    font-size: 14px !important;
}

.error-msg, .result-msg {
    color: #ff6b6b;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
    font-weight: 500;
}

.result-msg {
    color: #51cf66;
}

/* Game Screen */
.header {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.player-info {
    display: flex;
    gap: 20px;
    font-size: 18px;
    font-weight: bold;
}

.logout-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background: #e74c3c;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.game-container {
    display: flex;
    height: calc(100vh - 60px);
}

.menu {
    width: 200px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    border-right: 2px solid rgba(255, 215, 0, 0.3);
}

.menu-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #eee;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.menu-btn:hover {
    background: rgba(255, 215, 0, 0.1);
}

.menu-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-left: 4px solid #ffd700;
}

.section {
    display: none;
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.section.active {
    display: block;
}

.section h2 {
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Battle Section */
.battle-area {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 30px 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    position: relative;
    min-height: 400px;
}

.fighter {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-width: 200px;
    position: relative;
}

.fighter-character {
    font-size: 80px;
    margin: 20px 0;
    display: inline-block;
    transition: transform 0.3s;
}

.fighter.attacking .fighter-character {
    animation: attack 0.5s ease;
}

.fighter.hit .fighter-character {
    animation: hit 0.3s ease;
}

@keyframes attack {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(30px) scale(1.2); }
    100% { transform: translateX(0) scale(1); }
}

@keyframes hit {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.player-fighter .fighter-character {
    transform: scaleX(-1);
}

.fighter-name {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.fighter-hp {
    font-size: 1.2em;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.fighter-hp-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fighter-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8787);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.fighter-stats {
    font-size: 0.9em;
    color: #aaa;
}

.damage-number {
    position: absolute;
    font-size: 2em;
    font-weight: bold;
    color: #ff6b6b;
    animation: damageFloat 1s ease-out forwards;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes damageFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.vs {
    font-size: 3em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.battle-log {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-family: monospace;
}

.battle-log div {
    margin-bottom: 5px;
}

.action-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Shop Section */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.shop-category {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.shop-category h3 {
    margin-bottom: 15px;
    color: #ffd700;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-item-stats {
    font-size: 0.9em;
    color: #aaa;
}

.shop-item-price {
    color: #ffd700;
    font-weight: bold;
    margin-right: 10px;
}

.shop-item button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: #51cf66;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.shop-item button:hover {
    background: #40c057;
}

/* Inventory Section */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.character-selector {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.character-selector h3 {
    margin-bottom: 15px;
    color: #ffd700;
}

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

.character-btn {
    padding: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.character-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: scale(1.05);
}

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

.inventory-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.inventory-item-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.inventory-item-stats {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 10px;
}

.inventory-item button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: #fff;
    cursor: pointer;
    margin: 5px;
}

/* Chat Section */
.chat-messages {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.chat-message.admin {
    border-left: 4px solid #e74c3c;
}

.chat-message.vip {
    border-left: 4px solid #ffd700;
}

.chat-message.player {
    border-left: 4px solid #667eea;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
}

.chat-input button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

/* Support Section */
.support-form {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.support-form input,
.support-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
    font-family: inherit;
}

.support-form textarea {
    min-height: 100px;
    resize: vertical;
}

.support-form button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ticket-topic {
    font-weight: bold;
    font-size: 1.2em;
}

.ticket-status {
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.9em;
}

.ticket-status.pending {
    background: #ffd700;
    color: #000;
}

.ticket-status.resolved {
    background: #51cf66;
    color: #fff;
}

.ticket-description {
    color: #aaa;
    margin-bottom: 10px;
}

.ticket-response {
    background: rgba(81, 207, 102, 0.1);
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #51cf66;
    margin-top: 10px;
}

/* Admin Panel */
.admin-form {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
}

.admin-form select option {
    background: #1a1a2e;
}

.admin-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-ticket {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.admin-ticket-response {
    margin-top: 15px;
}

.admin-ticket-response textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    min-height: 80px;
}

.admin-ticket-response button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
}

.admin-ticket-response .send-btn {
    background: #51cf66;
}

.admin-ticket-response .resolve-btn {
    background: #667eea;
}

.admin-users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.admin-user-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.admin-user-card h3 {
    margin-bottom: 10px;
    color: #ffd700;
}

.admin-user-card p {
    margin-bottom: 5px;
    color: #aaa;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* PvP Stats */
.pvp-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.stat-label {
    color: #aaa;
    font-size: 0.9em;
}

/* Donate Section */
.donate-info {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.donate-info p {
    margin: 5px 0;
    font-size: 1.1em;
}

.donate-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.donate-package {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
}

.donate-package:hover {
    border-color: #ffd700;
    transform: translateY(-5px);
}

.package-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.package-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.package-price {
    font-size: 1.5em;
    color: #51cf66;
    margin-bottom: 15px;
}

.donate-package button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

/* Адаптивный дизайн для мобильных */
@media (max-width: 768px) {
    .auth-container h1 {
        font-size: 2em;
    }
    
    .auth-form {
        min-width: 280px;
        padding: 30px 20px;
    }
    
    .game-container {
        flex-direction: column;
    }
    
    .menu {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 10px;
        border-right: none;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    }
    
    .menu-btn {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .section {
        padding: 15px;
    }
    
    .section h2 {
        font-size: 1.5em;
    }
    
    .battle-area {
        flex-direction: column;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .fighter {
        width: 100%;
        min-width: auto;
    }
    
    .vs {
        font-size: 2em;
        transform: rotate(90deg);
    }
    
    .fighter-character {
        font-size: 60px;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .player-info {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 14px;
    }
    
    .header {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .pvp-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 20px;
    }
    
    .donate-packages {
        grid-template-columns: 1fr;
    }
    
    .admin-users-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container h1 {
        font-size: 1.5em;
    }
    
    .auth-form {
        min-width: 250px;
        padding: 20px 15px;
    }
    
    .section {
        padding: 10px;
    }
    
    .battle-log {
        height: 150px;
        font-size: 0.9em;
    }
    
    .action-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* PvP Players List */
.pvp-players-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.pvp-player-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.pvp-player-card:hover {
    border-color: #ffd700;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.pvp-player-card h3 {
    margin-bottom: 10px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pvp-player-card p {
    margin: 5px 0;
    color: #aaa;
}

.pvp-player-card button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.pvp-player-card button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.no-players {
    text-align: center;
    color: #aaa;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Newbie Training */
.newbie-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid rgba(102, 126, 234, 0.5);
    text-align: center;
}

.newbie-info p {
    margin: 10px 0;
    font-size: 1.1em;
}

.newbie-progress {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.progress-item {
    font-size: 1.2em;
    font-weight: bold;
}

.graduated-card {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.2) 0%, rgba(102, 126, 234, 0.2) 100%);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid rgba(81, 207, 102, 0.5);
    max-width: 600px;
    margin: 50px auto;
}

.graduated-card h2 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #51cf66;
}

@media (max-width: 768px) {
    .newbie-progress {
        flex-direction: column;
        gap: 10px;
    }
    
    .graduated-card {
        padding: 40px 20px;
        margin: 20px;
    }
    
    .graduated-card h2 {
        font-size: 2em;
    }
}
