
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: #0a0a0a;
    color: #f4f4f4;
}

/* Header */
.header {
    background: #1c1c1c;
    color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

.player-info h3 {
    margin: 0 0 5px;
    font-size: 1.2em;
    color: #ddd;
}

.player-info p {
    margin: 0;
    color: #aaa;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    background: #2a2a2a;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.nav-link {
    margin: 0 10px;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.nav-link:hover {
    background: #444;
    color: #ddd;
}

/* Resources */
.resources {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #aaa;
}

.resources h4 {
    margin: 0;
    font-size: 1em;
    color: #f4f4f4;
}

.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.resource-item {
    margin: 5px 0;
    font-size: 0.9em;
    color: #ddd;
}

.logout-form {
    margin-top: 10px;
}

.logout-button {
    background: transparent;
    color: #f4f4f4;
    border: 1px solid #f4f4f4;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.logout-button:hover {
    background: #f4f4f4;
    color: #0a0a0a;
}

/* Main Content
.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}*/
.main {
    text-align: center;
}

/* Adaptive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .resources {
        align-items: center;
    }

    .navigation {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        margin: 5px 0;
    }

    .main-content {
        padding: 15px;
    }
}


.building-image {
    width: 200px;
    height: 200px;
}

.galaxy-sector {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, #1f1f1f, #2a2a2a);
    border: 2px solid #444;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galaxy-sector:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg, #444, #555);
}

.galaxy-sector img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.galaxy-sector:hover img {
    opacity: 1;
}
.galaxy-image {
    width: 200px;
    height: 200px;
}

.galaxy-sector img {
    width: 75px; /* Устанавливаем ширину */
    height: 75px; /* Устанавливаем высоту */
    object-fit: cover; /* Чтобы картинка вписывалась в заданные размеры */
    border-radius: 50%; /* Круглая форма */
    margin-bottom: 10px;
    border: 2px solid #444;
    transition: border 0.3s ease;
}




/* Распределяем сектора равномерно по окружности */
.galaxy-container a:nth-child(1) { transform: rotate(0deg) translate(300px); }
.galaxy-container a:nth-child(2) { transform: rotate(24deg) translate(300px); }
.galaxy-container a:nth-child(3) { transform: rotate(48deg) translate(300px); }
.galaxy-container a:nth-child(4) { transform: rotate(72deg) translate(300px); }
.galaxy-container a:nth-child(5) { transform: rotate(96deg) translate(300px); }
.galaxy-container a:nth-child(6) { transform: rotate(120deg) translate(300px); }
.galaxy-container a:nth-child(7) { transform: rotate(144deg) translate(300px); }
.galaxy-container a:nth-child(8) { transform: rotate(168deg) translate(300px); }
.galaxy-container a:nth-child(9) { transform: rotate(192deg) translate(300px); }
.galaxy-container a:nth-child(10) { transform: rotate(216deg) translate(300px); }
.galaxy-container a:nth-child(11) { transform: rotate(240deg) translate(300px); }
.galaxy-container a:nth-child(12) { transform: rotate(264deg) translate(300px); }
.galaxy-container a:nth-child(13) { transform: rotate(288deg) translate(300px); }
.galaxy-container a:nth-child(14) { transform: rotate(312deg) translate(300px); }
.galaxy-container a:nth-child(15) { transform: rotate(336deg) translate(300px); }


.fleet-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.fleet-container {
    width: 100%;
    max-width: 800px;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.fleet-title h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

.fleet-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fleet-list a {
    display: block;
    background: #2a2a2a;
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.fleet-list a:hover {
    background: #444;
    transform: scale(1.05);
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .fleet-container {
        padding: 15px;
    }

    .fleet-list a {
        padding: 10px 15px;
    }
}


/* Общие стили */
.page-container {
    padding: 20px;
    color: #f4f4f4;
    font-family: Arial, sans-serif;
}

.page-title {
    text-align: center;
    color: #fff;
    font-size: 2em;
    margin-bottom: 20px;
}

.page-description {
    text-align: center;
    margin-bottom: 30px;
    color: #ddd;
    font-size: 1.2em;
}

/* Карточка здания */
.building-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.building-card {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 20px;
    width: 300px;
    text-align: center;
}

.building-header {
    margin-bottom: 15px;
}

.building-name {
    color: #fff;
    font-size: 1.5em;
}

.building-body {
    margin-bottom: 15px;
}

.building-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.upgrade-cost-title {
    color: #f4f4f4;
    font-weight: bold;
    margin-bottom: 10px;
}

.upgrade-cost-list {
    list-style: none;
    padding: 0;
}

.upgrade-cost-item {
    color: #ddd;
    margin-bottom: 5px;
}

/* Кнопки */
.building-footer {
    margin-top: 15px;
}

.building-form {
    margin: 0;
}

.button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upgrade-button {
    background: #007bff;
    color: #fff;
}

.upgrade-button:hover {
    background: #0056b3;
}

.check-button {
    background: #28a745;
    color: #fff;
}

.check-button:hover {
    background: #1e7e34;
}

/* Адаптивность */
@media (max-width: 768px) {
    .building-card {
        width: 100%;
    }
}


/* Основной стиль для страницы */
.ships-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.ships-container {
    width: 100%;
    max-width: 800px;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.ships-title h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

/* Карточки кораблей */
.ships-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ship-card {
    background: #2a2a2a;
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.ship-card:hover {
    transform: scale(1.05);
    background: #3b3b3b;
}

/* Название корабля */
.ship-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #f4f4f4;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

/* Шаблон корабля */
.template-name {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 15px;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Изображение корабля */
.ship-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 15px auto;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ship-image:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}

/* Контейнер орудий */
.guns-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* Карточка отдельного орудия */
.gun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(40, 40, 40, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, background 0.3s ease;
}

.gun-item:hover {
    transform: scale(1.05);
    background: rgba(60, 60, 60, 0.95);
}

/* Изображение орудия */
.gun-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gun-image:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

/* Название орудия */
.gun-name {
    font-size: 1em;
    color: #fff;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-top: 5px;
}

/* Количество орудий */
.gun-quantity {
    font-size: 0.9em;
    color: #ddd;
    font-style: italic;
    text-align: center;
    margin-top: 2px;
}

/* Кнопка выбора другого флота */
.select-button {
    background: #cc6026;
    color: #0a0a0a;
    margin-top: 10px;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.select-button:hover {
    background: #e07234;
    transform: scale(1.05);

}

.button-center {
    text-align: center;
}

.create-fleet-button {
    background: #cc6026;
    color: #0a0a0a;
    margin-top: 10px;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.create-fleet-button:hover {
    background: #e07234;
    transform: scale(1.05);

}

.edit-fleet-name {
    background: #cc6026;
    color: #0a0a0a;
    margin-top: 10px;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.edit-fleet-name:hover {
    background: #e07234;
    transform: scale(1.05);

}

/* Стили для формы */
.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.form label {
    color: #f4f4f4;
    font-size: 1em;
    margin-bottom: 5px;
}

.form input[type="text"], textarea, select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}
.form input[type="number"],
.form select,
.form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #2a2a2a;
    color: #f4f4f4;
    font-size: 1em;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form input[type="text"]:focus,
.form input[type="number"]:focus,
.form select:focus,
.form textarea:focus {
    border: 1px solid #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* Кнопки формы */
.form .btn {
    text-align: center;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.form .btn-primary {
    background: #007bff;
    color: #fff;
}

.form .btn-primary:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.form .btn-secondary {
    background: #f60202;
    color: #fff;
}

.form .btn-secondary:hover {
    background: #c11919;
    transform: scale(1.05);
}

/* Отступы для заголовка */
h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .form {
        padding: 15px;
    }

    .form input[type="text"] {
        width: 100%; /* Растянуть на всю ширину контейнера */
        max-width: 400px; /* Максимальная ширина для ограничения */
        box-sizing: border-box; /* Включить padding и border в расчет ширины */
    }

    .form input[type="number"],
    .form select,
    .form textarea {
        font-size: 0.9em;
    }

    .form .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

.form .errorlist {
    display: none; /* Скрыть список ошибок */
}

/* Mission List */
.mission-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 2.5%;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 10% auto;
}

.mission-link {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 10px 1%;
    border-radius: 5px;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease, transform 0.3s ease;
}

/* Default styles for links */
.mission-link:hover {
    transform: scale(1.05);
}

/* Specific styles for each mission type */
.mission-attack {
    background: #d9534f;
}

.mission-attack:hover {
    background: #c9302c;
}

.mission-deliver {
    background: #5bc0de;
}

.mission-deliver:hover {
    background: #31b0d5;
}

.mission-reconnoiter {
    background: #5cb85c;
}

.mission-reconnoiter:hover {
    background: #449d44;
}

.mission-colonize {
    background: #f0ad4e;
}

.mission-colonize:hover {
    background: #ec971f;
}

