/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Контейнер */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 20px;
}

/* Заголовок */
header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: clamp(28px, 5vw, 42px);
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b00, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
}

header p {
    font-size: clamp(16px, 3vw, 20px);
    color: #cccccc;
    margin-bottom: 30px;
}

.highlight {
    color: #ff6b00;
    font-weight: bold;
}

/* Кнопки авторизации */
.auth-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* Базовые стили кнопок */
.btn {
    padding: 15px 30px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 160px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Специфичные стили кнопок */
.btn.register {
    background: linear-gradient(45deg, #ff6b00, #ff8c00);
    color: white;
}

.btn.login {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.btn.logout {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn.action {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn.toggle-stats {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    margin: 20px auto;
    display: block;
}

.btn.admin-panel {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn.work-select, .btn.license-btn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    min-width: 120px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 2px solid #ff6b00;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
}

/* Специфичные стили для окон с большим контентом */
#drivingSchoolModal .modal-content,
#workModal .modal-content,
#shopModal .modal-content,
#realEstateModal .modal-content,
#businessModal .modal-content,
#carDealershipModal .modal-content,
#officialWorkModal .modal-content {
    max-width: 800px;
    max-height: 90vh;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
    transition: color 0.3s;
}

.close:hover {
    color: #ff6b00;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #ff6b00;
    font-size: 24px;
}

/* Формы */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: bold;
    color: #cccccc;
}

.input-group input {
    padding: 12px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 16px;
    background: #1a1a1a;
    color: white;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b00;
}

.input-group small {
    color: #888;
    font-size: 12px;
}

/* Сообщения */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.message.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.message.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.hidden {
    display: none !important;
}

/* Статистика */
.stats-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #ff6b00;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.2);
}

.stats-container h2 {
    color: #ff6b00;
    margin-bottom: 20px;
    text-align: center;
    font-size: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ff6b00;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-label {
    font-weight: bold;
    color: #cccccc;
}

.stat-value {
    color: #ff6b00;
    font-weight: bold;
    font-size: 16px;
}

/* Действия */
.actions-container {
    margin-top: 30px;
}

.actions-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #3498db;
    font-size: 22px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
/* Система работы */
.work-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff6b00;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #ff6b00;
    border-bottom: 3px solid #ff6b00;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.work-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.work-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #333;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.work-option:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
}

.work-option h4 {
    color: #ff6b00;
    margin-bottom: 10px;
}

.work-option p {
    margin: 5px 0;
    font-size: 14px;
    color: #ccc;
}

/* Автошкола */
.license-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.license-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #3498db;
    text-align: center;
    transition: transform 0.3s;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.license-category:hover {
    transform: translateY(-5px);
    border-color: #3498db;
}

.license-category h4 {
    color: #3498db;
    margin-bottom: 10px;
}

/* Магазин */
.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #3498db;
    text-align: center;
    transition: transform 0.3s;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.shop-item:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
}

.shop-item h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.shop-item p {
    margin: 8px 0;
    color: #ccc;
}

/* Стили для недвижимости */
.real-estate-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.property-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #3498db;
    text-align: center;
    transition: all 0.3s ease;
}

.property-option:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.property-option h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 20px;
}

.property-price {
    font-size: 24px;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 15px;
}

.property-features {
    text-align: left;
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.property-features p {
    margin: 8px 0;
    color: #ccc;
    font-size: 14px;
}

.current-property {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2ecc71;
    margin: 20px 0;
}

.current-property h3 {
    color: #2ecc71;
    margin-bottom: 10px;
}

.property-income {
    color: #2ecc71;
    font-weight: bold;
    margin: 5px 0;
}

.property-sold {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
}

.property-sold h3 {
    color: #e74c3c;
}

/* Бизнесы */
.business-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.business-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #9b59b6;
    text-align: center;
    transition: all 0.3s ease;
}

.business-option:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.business-option h3 {
    color: #9b59b6;
    margin-bottom: 15px;
    font-size: 20px;
}

.business-price {
    font-size: 24px;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 15px;
}

.business-features {
    text-align: left;
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.business-features p {
    margin: 8px 0;
    color: #ccc;
    font-size: 14px;
}

.current-business {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #9b59b6;
    margin: 20px 0;
}

.current-business h3 {
    color: #9b59b6;
    margin-bottom: 10px;
}

.business-income {
    color: #2ecc71;
    font-weight: bold;
    margin: 5px 0;
}
/* Автосалон */
.car-categories {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff6b00;
    flex-wrap: wrap;
}

.car-categories .tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.car-categories .tab-btn.active {
    color: #ff6b00;
    border-bottom: 3px solid #ff6b00;
}

.car-tab-content {
    display: none;
}

.car-tab-content.active {
    display: block;
}

.car-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #3498db;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.car-option:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.car-option h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 20px;
}

.car-price {
    font-size: 24px;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 15px;
}

.car-features {
    text-align: left;
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.car-features p {
    margin: 8px 0;
    color: #ccc;
    font-size: 14px;
}

.current-car {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    margin: 20px 0;
}

.current-car h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.car-info {
    color: #3498db;
    font-weight: bold;
    margin: 5px 0;
}

/* Официальная работа */
.official-work-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.official-work-options .work-option {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e74c3c;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 250px;
}

.official-work-options .work-option:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
}

.official-work-options .work-option h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

/* Военная служба */
.military-info {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 2px solid #8e44ad;
}

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

.military-status h3 {
    color: #8e44ad;
    margin-bottom: 15px;
}

.military-status.success {
    border-left: 4px solid #2ecc71;
    padding-left: 15px;
}

.military-status.in-progress {
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.military-status.not-started {
    border-left: 4px solid #e74c3c;
    padding-left: 15px;
}

/* Прогресс-бар армии */
.army-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #ccc;
    font-size: 14px;
}

/* Задания армии */
.army-task {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #8e44ad;
}

.army-task h3 {
    color: #8e44ad;
    margin-bottom: 15px;
    text-align: center;
}

.physical-task, .shooting-task, .knowledge-test {
    text-align: center;
}

.physical-task button {
    font-size: 18px;
    padding: 15px 30px;
    margin: 10px 0;
}

.shooting-range {
    position: relative;
    height: 200px;
    border: 2px solid #333;
    border-radius: 10px;
    margin: 10px 0;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

.army-question {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #3498db;
}

.army-question h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.army-options {
    display: grid;
    gap: 8px;
}

.army-option {
    padding: 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.army-option:hover {
    background: #3d3d3d;
    border-color: #3498db;
}

.army-option.selected {
    background: #3498db;
    border-color: #2980b9;
}

/* Мини-игры */
.mine-game {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.mine-btn {
    padding: 30px;
    font-size: 24px;
    border: 2px solid #333;
    border-radius: 10px;
    background: #2d2d2d;
    cursor: pointer;
    transition: all 0.3s;
}

.mine-btn:hover {
    border-color: #ff6b00;
    transform: scale(1.05);
}

.mine-btn.found {
    background: #2ecc71;
    border-color: #27ae60;
}

.mine-btn.wrong {
    background: #e74c3c;
    border-color: #c0392b;
}

/* Экзамен */
.exam-question {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #3498db;
}

.exam-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.exam-option {
    padding: 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.exam-option:hover {
    background: #3d3d3d;
    border-color: #3498db;
}

.exam-option.selected {
    background: #3498db;
    border-color: #2980b9;
}

/* Таймер работы */
.work-timer {
    text-align: center;
    font-size: 18px;
    color: #ff6b00;
    margin: 10px 0;
    font-weight: bold;
}
/* Стили для телефона и чата */
.phone-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.phone-btn {
    font-size: 20px;
    padding: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
}

.phone-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.message-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #e74c3c;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

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

/* Стили для чата */
.chat-interface {
    margin-top: 15px;
}

.chat-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 2px solid #ff6b00;
}

.chat-tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.chat-tab-btn.active {
    color: #ff6b00;
    border-bottom: 3px solid #ff6b00;
}

.chat-tab-content {
    display: none;
    margin-bottom: 15px;
}

.chat-tab-content.active {
    display: block;
}

.chat-contacts {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-contacts input {
    flex: 1;
    padding: 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.chat-contacts input:focus {
    outline: none;
    border-color: #3498db;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    background: #1a1a1a;
    margin-bottom: 15px;
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.incoming {
    background: #2d2d2d;
    border: 1px solid #3498db;
    margin-right: auto;
}

.chat-message.outgoing {
    background: #1e3a5c;
    border: 1px solid #2980b9;
    margin-left: auto;
    text-align: right;
}

.message-sender {
    font-size: 12px;
    color: #ff6b00;
    margin-bottom: 5px;
    font-weight: bold;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
}

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

.message-input input {
    flex: 1;
    padding: 12px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.message-input input:focus {
    outline: none;
    border-color: #3498db;
}

.no-chat {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 50px 0;
    font-size: 16px;
}

/* Стили для списка контактов */
.contacts-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
}

.contact-item {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item:hover {
    background: #2d2d2d;
}

.contact-item.active {
    background: #3498db;
}

.contact-info {
    flex: 1;
}

.contact-number {
    font-weight: bold;
    color: #ff6b00;
    font-size: 16px;
}

.contact-nickname {
    color: #ccc;
    font-size: 12px;
    margin-top: 2px;
}

.contact-last-message {
    color: #888;
    font-size: 11px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-time {
    color: #666;
    font-size: 10px;
    text-align: right;
}

.no-contacts {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 30px 0;
}

/* Стили для формы добавления контакта */
.add-contact-form {
    padding: 15px;
}

.add-contact-form h3 {
    color: #ff6b00;
    margin-bottom: 15px;
    text-align: center;
}

.add-contact-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    box-sizing: border-box;
}

.add-contact-form input:focus {
    outline: none;
    border-color: #3498db;
}

.add-contact-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* Дополнительные стили для контактов */
.contact-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.contact-action-btn {
    padding: 4px 8px;
    font-size: 10px;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.contact-action-btn.delete {
    background: #e74c3c;
}

/* Мини-игры для основных работ */
.mini-game-container {
    text-align: center;
    padding: 20px;
}

.game-instructions {
    margin-bottom: 20px;
    color: #ccc;
    font-size: 16px;
}

/* Угонщик авто - Быстрые пальцы */
.car-theft-game {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto;
    border: 2px solid #333;
    border-radius: 10px;
    background: #1a1a1a;
    overflow: hidden;
}

.hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 0, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.hotspot:hover {
    transform: scale(1.1);
    background: rgba(255, 107, 0, 1);
}

/* Автобусник - Точная остановка */
.bus-game {
    position: relative;
    width: 400px;
    height: 200px;
    margin: 0 auto;
    border: 2px solid #333;
    border-radius: 10px;
    background: linear-gradient(to bottom, #87CEEB, #1E90FF);
    overflow: hidden;
}

.bus {
    position: absolute;
    width: 80px;
    height: 30px;
    background: #FF4136;
    border-radius: 5px;
    bottom: 30px;
    left: 50px;
    transition: left 0.1s;
}

.bus-stop-zone {
    position: absolute;
    width: 100px;
    height: 10px;
    background: rgba(46, 204, 113, 0.5);
    bottom: 20px;
}

.bus-stop-marker {
    position: absolute;
    width: 5px;
    height: 40px;
    background: #2ecc71;
    bottom: 20px;
}

/* Кладоискатель - Поиск сокровищ */
.treasure-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px auto;
    max-width: 300px;
}

.treasure-cell {
    width: 60px;
    height: 60px;
    background: #8B4513;
    border: 2px solid #654321;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.treasure-cell:hover {
    background: #A0522D;
}

.treasure-cell.checked {
    background: #DEB887;
}

.treasure-cell.treasure {
    background: #FFD700;
    border-color: #FFA500;
}

.treasure-hint {
    margin-top: 10px;
    font-weight: bold;
    color: #ff6b00;
}

/* Скрытие скроллбара для красоты */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ff8c00;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.contacts-list::-webkit-scrollbar {
    width: 6px;
}

.contacts-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .work-options {
        grid-template-columns: 1fr;
    }
    
    .license-categories {
        grid-template-columns: 1fr;
    }
    
    .shop-items {
        grid-template-columns: 1fr;
    }
    
    .mine-game {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .work-tabs {
        flex-direction: column;
    }
    
    .phone-icon {
        top: 10px;
        right: 10px;
    }
    
    .phone-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .real-estate-options {
        grid-template-columns: 1fr;
    }
    
    .property-option {
        padding: 20px;
    }
    
    .property-price {
        font-size: 20px;
    }
    
    .business-options {
        grid-template-columns: 1fr;
    }
    
    .car-categories {
        flex-direction: column;
    }
    
    .car-categories .tab-btn {
        min-width: auto;
    }
    
    .official-work-options {
        grid-template-columns: 1fr;
    }
    
    /* Мини-игры для мобильных */
    .car-theft-game {
        width: 250px;
        height: 150px;
    }
    
    .bus-game {
        width: 300px;
        height: 150px;
    }
    
    .treasure-game {
        max-width: 250px;
        gap: 5px;
    }
    
    .treasure-cell {
        width: 50px;
        height: 50px;
    }
    
    .toggle-stats {
        padding: 8px 16px;
        font-size: 13px;
        margin: 10px auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 5% auto;
        padding: 15px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        min-width: 140px;
    }
    
    .chat-contacts {
        flex-direction: column;
    }
    
    .message-input {
        flex-direction: column;
    }
    
    /* Мини-игры для очень маленьких экранов */
    .car-theft-game {
        width: 200px;
        height: 120px;
    }
    
    .bus-game {
        width: 250px;
        height: 120px;
    }
    
    .treasure-game {
        max-width: 200px;
    }
    
    .treasure-cell {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .hotspot {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}
.btn.leader-panel {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
}
/* Стили для админ-панели */
.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.faction-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.faction-card.army::before { background: linear-gradient(90deg, #8e44ad, #9b59b6); }
.faction-card.umvd::before { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.faction-card.gibdd::before { background: linear-gradient(90deg, #f39c12, #e67e22); }
.faction-card.fsb::before { background: linear-gradient(90deg, #2c3e50, #34495e); }
.faction-card.hospital::before { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.faction-card.media::before { background: linear-gradient(90deg, #9b59b6, #8e44ad); }

.faction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.faction-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.faction-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.faction-info h3 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.3em;
}

.faction-info p {
    color: #ccc;
    font-size: 0.9em;
}

.leader-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

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

.leader-name {
    font-weight: bold;
    color: #ff6b00;
    font-size: 1.1em;
}

.no-leader {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ff6b00;
    background: rgba(255, 255, 255, 0.15);
}

/* Стили для экономики и системных разделов */
.economy-controls, .system-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.control-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #333;
}

.control-card h3 {
    color: #ff6b00;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.danger-zone {
    border: 2px solid #e74c3c;
    padding: 15px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.1);
}

.system-stats .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.system-stats .stat-item:last-child {
    border-bottom: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}