/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #f4f4f4;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

/* Основной контент */
main {
    margin-top: 0;
}

/* Секция Hero */
.hero {
    background: linear-gradient(rgba(52, 152, 219, 0.8), rgba(44, 62, 80, 0.8)), url('../images/7d2d-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 2.5rem 0;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.4;
}

.hero a {
    color: #ecf0f1;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.hero a:hover {
    border-bottom-color: #ecf0f1;
}

/* Telegram link container */
.telegram-link {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.telegram-link span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.link-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.link-text {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.copy-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #2ecc71;
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
    background: #229954;
}

/* Секция правил */
.rules {
    background: white;
    padding: 2rem 0;
}

.rules-list {
    max-width: 800px;
    margin: 0 auto;
}

.rule {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    padding: 0.6rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.rule:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.rule .emoji {
    font-size: 1.2rem;
    margin-right: 0.6rem;
    min-width: 1.6rem;
}

.rule span:last-child {
    flex: 1;
    line-height: 1.3;
    font-size: 0.9rem;
}

.rules-footer {
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Секции */
section {
    padding: 2rem 0;
}

section:nth-child(even) {
    background-color: white;
}

h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #2c3e50;
}

/* Моды */
.mods {
    background: #fff;
    padding: 2rem 0;
}

.mods h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.mods p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.mod-preview {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #3498db;
}

.mod-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.mod-preview h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.mod-preview p {
    text-align: left;
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}

.mods-action {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Стили для страницы модов */
.mod-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.mod-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.mod-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.mod-version {
    background: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mod-description > p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.mod-details h4 {
    color: #34495e;
    margin: 1.5rem 0 0.8rem 0;
    font-size: 1.1rem;
}

.mod-details ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.mod-details li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.mod-details p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.installation {
    background: #f8f9fa;
    padding: 2rem 0;
}

.installation h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.installation-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.step {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #27ae60;
}

.step h3 {
    color: #27ae60;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.step p {
    line-height: 1.5;
    margin: 0;
}

.step code {
    background: #f1f2f6;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
}

/* Навигация на странице модов */
nav {
    margin-top: 1rem;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: white;
}

/* Список серверов */
.servers {
    background: #f8f9fa;
    padding: 2rem 0;
}

/* Статус EOS Services */
.eos-status {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.eos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.eos-status h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.refresh-btn {
    background: #3498db;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.refresh-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.refresh-icon {
    font-size: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.refresh-btn.spinning .refresh-icon {
    animation: spin 1s linear infinite;
}

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

.eos-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.service-item:hover {
    background: #e9ecef;
}

.service-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-dot.operational {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.status-dot.degraded {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.status-dot.outage {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.status-dot.maintenance {
    background-color: #6c757d;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

.service-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.service-status {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.eos-updated {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.eos-updated small {
    color: #6c757d;
    font-size: 0.8rem;
}

.server-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.server-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.server-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.server-icon {
    flex-shrink: 0;
}

.server-icon img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.server-item:hover .server-icon img {
    border-color: #3498db;
}

.server-info {
    flex: 1;
}

.server-info h3 {
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
}

.server-info p {
    color: #6c757d;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    font-size: 0.9rem;
}

.server-mods {
    margin-bottom: 1rem;
}

.mods-expandable {
    width: 100%;
}

.mods-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mods-badge:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-1px);
}

.expand-toggle {
    user-select: none;
}

.mods-area {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 0.8rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.mods-area.show {
    max-height: 600px;
    padding: 1rem;
    opacity: 1;
}

.mod-item-mini {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.8rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.mod-item-mini:hover {
    background-color: #ffffff;
}

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

.mod-title {
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.mod-title:hover {
    color: #3498db;
}

.mod-desc {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.3;
}

.mods-features {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.3rem;
}

/* Стили для детальной информации о сервере */
.server-details-expandable {
    width: 100%;
    margin-bottom: 1rem;
}

.details-badge {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.details-badge:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
}

.server-details-area {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 0.8rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.server-details-area.show {
    max-height: 3000px;
    padding: 1.2rem;
    opacity: 1;
    overflow-y: auto;
}

.details-section {
    margin-bottom: 1.5rem;
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section h4 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    gap: 1rem;
}

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

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    flex-shrink: 0;
    min-width: 140px;
}

.detail-value {
    color: #2c3e50;
    font-size: 0.85rem;
    text-align: right;
    flex-grow: 1;
    line-height: 1.3;
}

.gameplay-tips {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem;
    background: #ffffff;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    transition: all 0.2s ease;
}

.tip-item:hover {
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    transform: translateX(3px);
}

.tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tip-item span:last-child {
    color: #495057;
    font-size: 0.85rem;
    line-height: 1.4;
}

.server-details {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.status {
    font-size: 0.9rem;
    font-weight: 500;
}

.status.online {
    color: #28a745;
}

.status.offline {
    color: #dc3545;
}

.players {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Список конфигураций */
.config-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.config-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.config-item:hover {
    transform: translateY(-5px);
}

.config-item h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 0.8rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Подвал */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 0;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin: 0 auto 0.4rem;
    }
    
    .server-item {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
    }
    
    .server-details {
        justify-content: center;
    }
    
    .mods-badge {
        display: block;
        margin-bottom: 0.8rem;
        width: 100%;
        text-align: center;
    }
    
    .details-badge {
        display: block;
        margin-bottom: 0.8rem;
        width: 100%;
        text-align: center;
    }
    
    .mods-area {
        margin-top: 0.5rem;
    }
    
    .mods-area.show {
        max-height: 700px;
        padding: 0.8rem;
    }
    
    .server-details-area.show {
        max-height: 3500px;
        padding: 1rem;
        overflow-y: auto;
    }
    
    .details-section h4 {
        font-size: 0.95rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .detail-label {
        min-width: auto;
        font-weight: 700;
        color: #2c3e50;
    }
    
    .detail-value {
        text-align: left;
        font-size: 0.8rem;
    }
    
    .tip-item {
        padding: 0.5rem;
    }
    
    .tip-item span:last-child {
        font-size: 0.8rem;
    }
    
    .mod-item-mini {
        padding: 0.6rem;
    }
    
    .mod-title {
        font-size: 0.85rem;
    }
    
    .mod-desc {
        font-size: 0.75rem;
    }
    
    .mods-features {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .rule {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .rule .emoji {
        margin-right: 0;
        margin-bottom: 0.3rem;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    .rules {
        padding: 1.5rem 0;
    }
    
    .servers {
        padding: 1.5rem 0;
    }
    
    /* EOS Status для мобильных */
    .eos-status {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .eos-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .eos-services {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .service-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }
    
    .service-indicator {
        justify-content: center;
    }
    
    /* Моды для мобильных */
    .mods {
        padding: 1.5rem 0;
    }
    
    .mods-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mod-preview {
        padding: 1.2rem;
    }
    
    .mod-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .mod-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .installation-steps {
        grid-template-columns: 1fr;
    }
    
    .step {
        padding: 1.2rem;
    }
}
