/* base.css - Общие стили для всех страниц */

@import url('https://fonts.googleapis.com/css2?family=Jura:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Jura', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #e0e0e0;
    animation: fadeInBody 1s ease-out forwards;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

h1, h2 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 16px;
    text-align: center;
}

/* Animations */
@keyframes fadeInBody {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
header {
    background-color: #1e1e1e;
    padding: 16px 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: slideInDown 0.8s ease-out 0.2s forwards;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    width: 100%;
    left: 0;
    right: 0;
}

.logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #bb86fc;
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 24px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
}

nav ul li a:hover {
    color: #e0e0e0;
    transform: scale(1.1);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hamburger.active {
    transform: rotate(90deg);
}

/* Main Content */
main {
    flex: 1;
    padding: 32px 16px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
footer {
    background-color: #1e1e1e;
    color: #e0e0e0;
    padding: 24px;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.8s forwards;
    margin-top: auto;
    width: 100%;
    left: 0;
    right: 0;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    display: flex;
    justify-content: center;
    gap: 16px;
}

footer ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

footer ul li a:hover {
    color: #e0e0e0;
    transform: scale(1.1);
}

footer p {
    margin: 8px 0;
    color: #bbbbbb;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
}

.loading-spinner::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #bb86fc;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    animation: fadeInModal 0.5s ease-out forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #1e1e1e;
    padding: 16px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    transition: transform 0.5s ease;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #2c2c2c;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #e0e0e0;
}

.close-modal {
    position: absolute;
    top: 8px;
    right: 16px;
    color: #e0e0e0;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.close-modal:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

/* Content Grid (используется на about, contact, support, other) */
.content-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.content-item {
    flex: 0 0 300px;
    background-color: #2c2c2c;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.content-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.content-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.content-item h3 {
    font-size: 18px;
    margin: 12px 16px 8px;
    color: #ffffff;
}

.content-item p {
    font-size: 14px;
    margin: 0 16px 16px;
    line-height: 1.4;
    color: #e0e0e0;
    min-height: 55px;
}

.content-button {
    margin-top: auto;
    margin-left: 16px;
    margin-right: 16px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background-color: #bb86fc;
    color: #121212;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
}

.content-button:hover {
    background-color: #ffffff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 16px;
    }

    .hamburger {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 16px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #1e1e1e;
        padding: 16px 0;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    nav ul.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        z-index: 100;
    }

    main {
        padding: 16px 8px;
    }

    footer {
        padding: 16px;
    }

    footer ul {
        flex-direction: column;
    }
}
