/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');


/* --- General Styles --- */
body {
    color: #f0f0f0;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Header & Navigation --- */
header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Левая часть шапки --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}
.logo img {
    max-height: 45px;
    width: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(255, 153, 0, 0.7));
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
nav a:hover {
    color: var(--text-color);
}
nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--brand-orange);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}


/* --- Правая часть шапки --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}
.action-buttons {
    display: flex;
    align-items: center;
    gap: 25px;
}


@media (max-width: 1024px) {
    .header-left nav.desktop-nav {
        display: none; 
    }
    .burger-menu {
        display: block;
    }
}


/* --- Login Button --- */
.login-btn {
    background-color: #ff9900;
    color: #1a1a1a;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.login-btn:hover {
    background-color: #ffac33;
    transform: translateY(-2px);
    color: #1a1a1a;
}
.login-btn:hover::after {
    transform: scaleX(0);
}


/* --- Language buttons --- */
.lang-dropdown {
    position: relative;
    cursor: pointer;
}
.lang-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.lang-selected:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.selected-flag-container {
    line-height: 0;
}

.flag-icon {
    width: 35px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
    display: block;
}
.lang-selected .fa-caret-down {
    color: #888;
    transition: transform 0.3s ease;
}
.lang-options {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    list-style: none;
    margin: 0;
    padding: 8px;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.lang-dropdown.open .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown.open .lang-selected .fa-caret-down {
    transform: rotate(180deg);
}
.lang-options li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
}
.lang-options li:hover {
    background-color: rgba(255, 153, 0, 0.2);
}

/* --- Logo --- */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.6em;
    font-weight: 700;
    color: #ff9900;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
}
.logo img {
    max-height: 100px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(255, 153, 0, 0.7));
}
a.logo {
    text-decoration: none;
}
@media (max-width: 768px) {
    .logo .logo-text {
        display: none;
    }

    .logo img {
        max-height: 100px;
    }
}



nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ff9900;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav a:hover {
    color: #ff9900;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Main Content --- */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.welcome-text h1 {
    font-size: 3em;
    margin-bottom: 0;
    font-weight: 700;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.welcome-text p {
    font-size: 1.5em;
    margin-top: 10px;
    color: #b0b0b0;
}

/* --- Game Selection Cards --- */
.game-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
    margin-top: 50px;
}

.game-card {
    width: 200px;
    height: 200px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}



.closed-game-card {
    position: relative;
    cursor: not-allowed;
}

.closed-game-card img {
    filter: blur(2px) grayscale(50%);
    transition: filter 0.3s ease;
}

.closed-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(200, 0, 0, 0);
    border-radius: inherit;
    z-index: 1;
}

.closed-game-card .fa-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 4em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.closed-game-card:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: transparent;
}

.closed-game-card:hover img {
    transform: none;
}




.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 153, 0, 0.5);
    border-color: rgba(255, 153, 0, 0.7);
}

.game-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.1);
}

.game-card img[alt="Roblox Logo"] {
    box-sizing: border-box;
}

.game-card img[alt="Minecraft Logo"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* --- Project Suggestion Textarea --- */
.suggest-card {
    /* Настраиваем внутреннее содержимое */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    
    /* Делаем ее немного другой */
    background: transparent;
    border: 3px dashed #555; /* Пунктирная граница */
}

.suggest-card .fa-plus {
    font-size: 3em;
    color: #888;
    transition: transform 0.3s ease, color 0.3s ease;
}

.suggest-card span {
    font-weight: 700;
    color: #888;
    text-align: center;
    transition: color 0.3s ease;
}

/* Эффект при наведении */
.suggest-card:hover {
    border-color: #ff9900;
    border-style: dashed; /* Оставляем пунктир */
}

.suggest-card:hover .fa-plus {
    color: #ff9900;
    transform: rotate(90deg) scale(1.1); /* Поворот и увеличение плюсика */
}

.suggest-card:hover span {
    color: #ff9900;
}

/* --- Typewriter Cursor Effect --- */
.typing-cursor::after {
    content: '_';
    font-weight: bold;
    color: #ff9900; /* Orange color for the cursor */
    animation: blink 1s step-end infinite;
    margin-left: 0.2em;
}

@keyframes blink {
    from, to {
        color: transparent;
    }
    50% {
        color: #ff9900;
    }
}

#typewriter-h1 {
    color: white;
}

.lang-switch-text {
    color: white;
}

/* --- Footer --- */
.site-footer {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    color: #b0b0b0;
    padding: 25px 0;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-content p {
    margin: 0;
    font-size: 0.9em;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #b0b0b0;
    font-size: 1.5em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #ff9900;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        justify-content: center;
    }
}

/* --- === АДАПТИВНОСТЬ === --- */

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    width: 45px;
    height: 37px;
}
.burger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #f0f0f0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
    position: absolute;
    left: 10px;
}
.burger-line:nth-child(1) { top: 8px; }
.burger-line:nth-child(2) { top: 16px; }
.burger-line:nth-child(3) { top: 24px; }

body.mobile-nav-is-open .burger-line:nth-child(1) {
    top: 16px;
    transform: rotate(45deg);
}
body.mobile-nav-is-open .burger-line:nth-child(2) {
    opacity: 0;
}
body.mobile-nav-is-open .burger-line:nth-child(3) {
    top: 16px;
    transform: rotate(-45deg);
}
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    /* max-width: 400px; */
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.mobile-nav.is-open {
    right: 0;
}
.mobile-nav a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 2em;
    font-weight: 700;
}
body.mobile-nav-is-open {
    overflow: hidden;
}

/* 2. Медиа-запросы для разных экранов */
@media (max-width: 1024px) {
    header { padding: 20px; }
    .desktop-nav { display: none; }
    .burger-menu { display: block; }
    .header-controls { gap: 20px; }
    .welcome-text h1 { font-size: 2.5em; }
    .welcome-text p { font-size: 1.2em; }
    .project-suggestion textarea { width: 90%; max-width: 480px; }
}
@media (max-width: 768px) {
    .logo { font-size: 1.4em; }
    .game-selection { gap: 20px; }
    .game-card { width: 150px; height: 150px; }
}
@media (max-width: 480px) {
    .header-controls { gap: 15px; }
    .login-btn { padding: 6px 14px; font-size: 0.9em; }
    .flag-icon { width: 30px; }
    .welcome-text h1 { font-size: 2em; line-height: 1.2; }
    .welcome-text p { font-size: 1.1em; }
    .game-card {
        /* width: calc(50% - 10px); */
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .closed-game-card .fa-lock {
        font-size: 3em;
    }
}