:root {
    --main-dark: #DDDDDD;
    --main-light: #000000;

    --grey-dark: #A5A8AF;
    --grey-light: #46484B;

    /* --field-dark: #373E4E; */
    --field-dark: rgba(75, 166, 235, 0.15);
    --field-light: #D6D7D9;

    --darkfield-dark: #1F232F;
    --darkfield-light: #E6E9F2;

    /* --bg-dark: #292F3F; */
    --bg-dark: rgba(32, 35, 46, 0.8);
    --bg-light: #FFFFFF;

    --red: #FF6074;
    --green: #39AB95;
    --blue: #03A9F1;

    --grey: #A5A8AF;
    --font-family: 'SF Pro Text', sans-serif;

    --main-color: var(--main-dark);
    --grey-color: var(--grey-dark);
    --field-color: var(--field-dark);
    --darkfield-color: var(--darkfield-dark);
    --bg-color: var(--bg-dark);

    color-scheme: light only;}

[data-theme="dark"] {
    --main-color: var(--main-dark);
    --grey-color: var(--grey-dark);
    --field-color: var(--field-dark);
    --darkfield-color: var(--darkfield-dark);
    --bg-color: var(--bg-dark);
    --bg-fader: rgba(32, 35, 46, 0.9) 
}

[data-theme="light"] {
    --main-color: var(--main-light);
    --grey-color: var(--grey-light);
    --field-color: var(--field-light);
    --darkfield-color: var(--darkfield-light);
    --bg-color: var(--bg-light);}


button:not(.selector button):hover { transform: scale(1.1); transition: transform 0.3s; }
div.button:hover { transform: scale(1.1); transition: transform 0.3s; }

/* Buttons */
button {
    border-radius: 100px !important;
    color: var(--main-color);
    border: none;
    font-weight: 600;
    font-family: var(--font-family);
    flex: 1;
    background: var(--green);
    background-color: var(--green);
    -webkit-background-color: var(--green);
    padding: 0 15px;
    text-align: center;
    position: relative;
    width: fit-content;
    white-space: nowrap;}
button.big {
    height: 40px;
    font-size: 17px;}
button.middle {
    height: 32px;
    font-size: 15px;}
button.small {
    height: 24px;
    font-size: 13px;}
button.emoji-button {
    font-size: 15px;
    text-transform: uppercase;
    color: var(--green);
    background-color: transparent;
    border: none;
    padding: 0 !important;
    margin: 0 6px 0 0;}
button.green { background-color: var(--green);}
button.red { background-color: var(--red);}
button.blue { background-color: var(--blue);}
button.secondary { background-color: var(--field-color);}
button:disabled { background-color: var(--grey-color); opacity: 0.5;}

/* Стилі для десктопів (від 1024px) */
@media screen and (min-width: 578px) {
    .pageContent {
        padding: 18px calc(15px + (100% - 155px - min(100% - 155px,640px))/2) 100px calc(140px + (100% - 155px - min(100% - 155px,640px))/2);
    }

    /*  */
    .mainMenu {
        left: 0;
        top: 0;
        position: fixed;
        height: 100%;
        width: 140px;
        overflow: hidden;
    }
    .mainMenu .mainMenuScrollable {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
        touch-action: pan-y; /* Дозволяє вертикальний скрол на сенсорних пристроях */
        height: 100%;
        overflow-y: auto;
        scrollbar-width: none;
    }
    .mainMenu button {
        flex: 0 0 auto;
        width: 100%;
        padding: 20px 0 !important;
    }
    .mainMenu .additional {
        display: flex;
    }
    .mainMenu .moreButton {
        display: none;
    }
    .mainMenu button { margin-bottom: 3px;}
    .mainMenu button.active { border-left: 3px solid var(--green);}

    button.addIdea {
        display: none;
    }
}

@media screen and (max-width: 578px) {
    .pageContent {
        padding: 18px 15px 100px 15px;
        min-width: 300px;

    }
    .mainMenu {
        left:0;
        background-color: var(--darkfield-color);
        position: fixed;
        bottom: 0;
        width: 100%;}
    .mainMenu .mainMenuScrollable {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mainMenu .additional {
        display: none;
    }
    .mainMenu button {
        padding: 10px 0 13px 0;
    }
    .mainMenu button.active { border-bottom: 3px solid var(--green); padding-bottom: 10px;}

    .mainMenu.fullMenu .mainMenuScrollable {
        height:150px;
        flex-wrap: wrap;
    }
    .mainMenu.fullMenu button {
        min-width: calc(100% / 4);
    }

    .mainMenu.fullMenu .additional {
        display: flex;
    }
    .mainMenu.fullMenu .mainMenuLogo {
        display: none;
    }

    /* Add Idea Button */
    .mainMenu button.addIdea {
        margin: 0;
        padding:15px 15px 12px 15px;
        position: fixed;
        bottom: 80px;
        right: 20px;
        opacity: 1 !important;
        background-color: var(--green) !important;
        border-radius: 100px !important;
        color: white;
        z-index: 1000;}
    .mainMenu button.addIdea:hover { transform: scale(1.1); transition: transform 0.3s;}

    .mainMenu.fullMenu button.addIdea {
        display: none;
    }

}

.pageContent {
    visibility: hidden;
    min-height: 100vh;
}

.mainMenu button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color:transparent;
    color: #fff;
    border: none;
    border-radius: 0 !important;
    font-size: 14px;}
.mainMenu button .menu-icon { font-size: 24px;}
.mainMenu button .menu-icon .update-count { position: absolute; margin-left: -5px;}
.mainMenu button:not(.active) { opacity: 0.5; }
.mainMenu .mainMenuLogo { margin: 20px 0 0 0; }


/* GLOBAL CLASSES */
body {
    color: var(--main-color);
    font-family: var(--font-family);
    margin:0;
    padding:0;
    /* padding:10px 15px; */
    -webkit-font-smoothing: antialiased;
    cursor: default;
    background-color: var(--bg-color);
}
.pageContent {
    /* padding: 10px 15px 100px 15px; */
    background-color: var(--bg-fader);
}
/* COMMON ELEMENTS */
a {
    text-decoration: none;
    color: var(--main-color);}
h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;}
h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;}
/* Button Groups */
.buttonGroup {
    display: -webkit-flex;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 15px;}
.buttonGroup button {
    background-color: var(--field-color);}
.buttonGroup button.active {
    background-color: var(--blue);}
.buttonGroup button.submit {
    background-color: var(--green);}
    


/* Selector */
.selector {
    border-radius: 100px;
    display: flex;
    padding:3px;
    gap: 3px;
    justify-content: space-between;
    background-color: var(--darkfield-color);
    margin: 0 auto 15px auto;
}
.selector button.active { background-color: var(--field-color); transition: background-color 0.3s;}
.selector button:not(.active) { background-color:  var(--darkfield-color); transition: background-color 0.3s;}

/* Update Count */
.update-count {
    font-size: 13px;
    background-color: var(--red);
    color: white;
    border-radius: 100px;
    padding: 2px 6px;
    margin-left: 6px;}
.update-count:empty {
    display: none;}
.update-count.small { font-size: 10px;}
.update-count.white { background-color: white; color: var(--grey-color);}
    
/* Textarea */
.textarea-container {
    position: relative;
    margin-bottom:0;}
.textarea-container .char-count {
    position: absolute;
    right: 10px;
    font-size:9px;
    color: var(--grey-color);}
    
/* Labels */
label {
    text-align: left;
    display: flex;
    align-items: center;}

/* Inputs */
input[type="text"], input[type="email"], textarea, select {
    flex: 1;
    font-size: 15px;
    width: 100%;
    padding: 10px;
    border:  1px solid var(--field-color);
    border-radius: 10px;
    background-color: var(--field-color);
    color: var(--main-color);
    font-family: var(--font-family);
    box-sizing: border-box;
    transition: border-color 0.3s;
    outline: none;
    box-shadow: none;
    resize: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;}   
input[type="text"]:focus, textarea:focus, select:focus {
    border-color: 1px solid var(--grey-color);
    box-shadow: none;
    background-color: rgba(55, 62, 78, 0.8);
    transition: background-color 0.3s;
}

/* Error Message */
.error-message {
    font-size: 14px;
    color: var(--red);
    margin: 5px 0 10px 7px;
    display: none; 
    position: relative;
    display: block;}
.error-message:empty { display: none; }


/* Tags */
.tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4px;}
.tags .tag {
    background-color: var(--blue);
    color: white;
    border-radius: 100px;
    padding: 2px 8px;
    margin-right: 5px;
    white-space: nowrap;}
.tags.small .tag { font-size: 11px; margin-bottom:2px;}
.tags.middle .tag { font-size: 13px; margin-bottom:4px;}
.tags.big .tag { font-size: 15px;}
.tags.huge .tag { font-size: 20px; padding: 3px 15px;}
.tags.technical .tag { background-color: var(--field-color); color: var(--main-color);}
.tags.green .tag { background-color: var(--green);}
.tags.red .tag { background-color: var(--red);}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 20px;}
.toggle-switch input { display: none;}
.toggle-switch label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--grey);
    border-radius: 34px;
    transition: background-color 0.2s;}
.toggle-slider {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;}
.toggle-switch input:checked + label { background-color: var(--green);}
.toggle-switch input:checked + label .toggle-slider { transform: translateX(12px);}

#suggestionsContainer {
    position: fixed;
    background: #2A3649;
    border-radius: 10px;
    z-index: 1000;
    max-height: 10em;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.suggestion {
    padding: 8px 12px;
    font-size: 14px;}
.suggestion:not(.no-results):hover, .suggestion.selected {
    background: var(--darkfield-color);
    color: var(--green);}
.suggestion.no-results {
    color: var(--grey-color);}
.suggestion mark {
    background-color: transparent;
    font-weight: 600;
    text-decoration: underline;
    color: white;}
.suggestion.selected mark{
    color: var(--green);}

.dropdown {
    margin: 0 auto;
    position: relative;
    background-color: #2A3649;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    min-height: 24px;
    width:100%;}
.dropdownHeader {
    background-color: #2A3649;
    color: var(--main-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    height:24px;
    position: absolute;
    z-index: 500;
    width: 100%;}
.dropdownHeader span {
    margin: 0 10px;}
.dropdownContent {
    background-color: #2A3649;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 10px;
    z-index: 1000;}
.dropdownItem {
    display: flex;
    color: var(--main-color);
    padding: 0px 10px;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    height:24px;}
.dropdownArrow {
    position: absolute;
    top:4px;
    right:10px;
    z-index:1001;}

/* SNIPPETS */
/* Back Button */
.pageHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto 10px auto;
    gap: 10px;}
.pageHeader .button {
    background: transparent;
    border: none;
    font-size: 24px;
    vertical-align: middle;}
.pageHeader .title {
    display: inline-block;
    font-size: 24px;
    font-weight: 600;
    vertical-align: middle;
    width:100%;}



/* Idea Snippet */
.ideaSnippet {
    margin: 0 auto 60px auto;}
.ideaSnippet .title {
    font-size: 28px;
    font-weight:bold;
    margin-bottom: 4px;}
.ideaSnippet .title a {
    text-decoration: none;
    color: var(--main-color);}
.ideaSnippet .text {
font-size: 16px;
line-height: 130%;
margin-top: 0;}
.ideaSnippet p {margin: 0 0 12px 0;}
.ideaSnippet .additionalInfo {
    font-size: 11px;
    margin-right: 5px;
    color: var(--grey-color);}
.ideaSnippet .readMore {
    font-size: 11px;
    color: var(--grey-color);}
.ideaSnippet .multiPlayerIcon {
    width: 37px;
    height: 14px;
    margin-right: 6px;}
.svgIcon path { fill: var(--main-color);}
    
.ideaSnippet.full .title {
    font-size: 28px;
    font-weight:bold;
    margin-bottom: 2px;}
.ideaSnippet.full .title {
    font-size: 28px;
    font-weight:bold;
    margin-bottom: 2px;}
    
.postSnippet {
    margin: 0 0 15px 0;}
.postSnippet .title {
    font-size: 17px;
    font-weight:bold;
    margin-bottom: 2px;}
.postSnippet .text {
    font-size: 15px;
    margin-top: 0;}
.postSnippet p {margin: 0 0 6px 0;}

.ideaSnippet.simple .longDescription, .ideaSnippet.simple .tags.technical {display: none;}


.ideaSnippet.expanded .readMore {display: none;}
.ideaSnippet.expanded .longDescription, .ideaSnippet.expanded .tags.technical {display: block;}
.ideaSnippet.expanded .longDescription {padding-top:15px; margin-top:15px; border-top: 1px solid var(--grey-color);}

.ideaSnippet.full .readMore {display: none;}
.ideaSnippet.full .ideaTitle {
    font-size: 28px;
    font-weight:bold;}
.ideaSnippet .ideaSnippet-buttons {
    display: flex;
    gap: 10px;
    margin-top: 0px;}
.ideaSnippet .tags.technical {margin-bottom: 10px;}

.favoriteButton {
    font-size: 24px;
    top:-2px;
    background: none;
    border: none;
    padding: 0 6px 0 0 !important;
    opacity: 0.3;
    transition: opacity 0.3s ease;}
.favoriteButton.favorite {
    opacity: 1;
    transition: opacity 0.3s ease;}
.ideaSnippet.full .favoriteButton {
    font-size: 24px;
}

.bottomContextMenuOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    opacity: 0;
    z-index: 1499;
    transition: opacity 0.3s ease-out;}
.bottomContextMenu {
    position: fixed;
    bottom: -100%;
    color: white;
    z-index: 1500;
    transition: bottom 0.3s ease-out;}
.bottomContextMenu .block {
    margin-bottom: 10px;
    width: 100%;}
.bottomContextMenu .block .menu {
    background-color: var(--grey-color);
    border-radius: 10px;
    padding: 15px;
}
.bottomContextMenu .block .menu .title {
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 2px solid white;
    padding-bottom: 8px;}
.bottomContextMenu .block .menu > div:not(.title) {
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);}
.bottomContextMenu .block .menu > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;}

.bottomContextMenu .block .title {
    color: var(--main-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

@media screen and (min-width: 578px) {
    .bottomContextMenu {
        padding: 15px calc(15px + (100% - 155px - min(100% - 155px, 640px))/2) 15px calc(140px + (100% - 155px - min(100% - 155px, 640px))/2);
        width: min(calc(100% - 155px), 640px);
    }
}

@media screen and (max-width: 578px) {
    .bottomContextMenu {
        padding: 15px;
        min-width: 300px;
        width: calc(100% - 30px);
    }
}


    
.searchTags {
    font-size: 13px;
    color: var(--grey-color);}
.searchTags .tagsBlock {
    margin-bottom: 8px;}
.searchTags .tagsBlock div {
    margin-bottom: 4px;}
.searchTags .tagsBlock:has(.tags.middle:empty) {
    display: none;}

.topPopup {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--darkfield-color);
    color: var(--main-color);
    padding: 25px 25px 15px 25px;
    border-radius: 10px;
    transition: top 0.3s ease-out;
    z-index: 2000;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-size: 15px;
}

.gameSnippet { margin: 0 auto 60px auto; }

.gameSnippet .title {
    font-size: 22px;
    font-weight:bold;
    margin-bottom: 2px;}

.gameSnippet .multiplayer {
    margin-left: 5px;
}
.gameSnippet .update-count {
    font-size: 11px;
    background-color: var(--red);
    color: var(--main-color);
    margin: 0px 0px 0px 0px;
}
.gameSnippet .info div {
    font-size: 14px;
    margin-bottom: 4px;
}
.gameSnippet .info div a {
    display: inline-block;
    max-width: calc(100% - 120px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.gameSnippet .info .datetime {
    font-size: 11px;
    color: var(--grey-color);
}

.topPopup.show {
    top: -10px;
}

.fullscreen-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
.popup-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: #222;
    color: white;
    align-items: center;
}
.popup-title {
    font-size: 18px;
    font-weight: bold;
}
.popup-close {
    font-size: 24px;
}
.popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
.image-item {
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 8px;
    overflow: hidden;
}
.image-item:hover {
    transform: scale(1.05);
}
.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.loader {
    text-align: center;
    padding: 20px;
}

.game-info .datetime {
    font-size: 12px;
    color: var(--grey-color);
}

.spinner {
    margin: 0 auto;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

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

.hidden {display: none;}
    