/* styles.css */

:root {
    --bg1-color: #f5f5f5; /* lightest background */
    --bg2-color: #e0e0e0;
    --bg3-color: #d4d4d4;
    --bg4-color: #c0c0c0;
    --bg5-color: #b0b0b0; /* darkest light background */
    --bg6-color: #f0f0f0;
    --bg7-color: #e9e9e9;
    --bg8-color: #fff;
    --search-btn-hover-bg-color: #00e382;
    --b503-text-color:#b87114;
    --text1-color: #222222; /* primary text */
    --text2-color: #111111; /* secondary text */

    --Icons: url('../sprites/icons-ligth.png');
    --TabIcons: url('../sprites/tab-icons-ligth.png');
    --SourceIcon: url('../sprites/source-icon-ligth.png');
    --FullScreenIcon: url('../sprites/fullScreen-icon-ligth.png');
    --ViewsIcon: url('../sprites/views-icon-ligth.png');
    --LikeIcon: url('../sprites/like-icon-ligth.png');
    --DislikeIcon: url('../sprites/dislike-icon-ligth.png');
    --ShareIcon: url('../sprites/share-icon-ligth.png');
    --ReportIcon: url('../sprites/report-icon-ligth.png');
    --DotsBurgerHorizontalIcon: url('../sprites/dotsBurgerHorizontal-icon-ligth.png');
    --SearchIcon: url('../sprites/search-icon-ligth.png');
}

[data-theme="dark"] {
    --bg1-color: #333;
    --bg2-color: #444;
    --bg3-color: #222;
    --bg4-color: #2a2a2a;
    --bg5-color: #1e1e1e;
    --bg6-color: #303030;
    --bg7-color: #666;
    --bg8-color: #888;
    --search-btn-hover-bg-color: #002a15;
    --b503-text-color:#f3d05e;
    --text1-color: #f5f5f5;
    --text2-color: #fff;
    
    --Icons: url('../sprites/icons.png');
    --TabIcons: url('../sprites/tab-icons.png');
    --SourceIcon: url('../sprites/source-icon.png');
    --FullScreenIcon: url('../sprites/fullScreen-icon.png');
    --ViewsIcon: url('../sprites/views-icon.png');
    --LikeIcon: url('../sprites/like-icon.png');
    --DislikeIcon: url('../sprites/dislike-icon.png');
    --ShareIcon: url('../sprites/share-icon.png');
    --ReportIcon: url('../sprites/report-icon.png');
    --DotsBurgerHorizontalIcon: url('../sprites/dotsBurgerHorizontal-icon.png');
    --SearchIcon: url('../sprites/search-icon.png');
}

/* General hover styling */
*:hover {
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    /*filter: brightness(1.1); /* Slightly brighten hovered elements */
}

/* Custom scrollbar styling for all scrollable elements */
*::-webkit-scrollbar {
    width: 20px; /* Width of vertical scrollbar */
    height: 20px; /* Height of horizontal scrollbar */
}

*::-webkit-scrollbar-thumb {
    background-color: var(--bg2-color); /* Dark color for the scrollbar thumb */
    border-radius: 4px; /* Rounded corners for the thumb */
    border: 2px solid var(--bg3-color); /* Subtle border for contrast */
}

*::-webkit-scrollbar-track {
    background: var(--bg5-color); /* Match the background of the editor */
    border-radius: 4px; /* Rounded corners for the track */
}

/* Scrollbar thumb hover effect */
*::-webkit-scrollbar-thumb:hover {
    background-color: var(--bg7-color); /* Lighten the thumb on hover */
}

/* Scrollbar thumb active (when clicked) */
*::-webkit-scrollbar-thumb:active {
    background-color: var(--bg8-color); /* Further lighten when active */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Fira Code', 'Courier New', monospace;
    background-color: var(--bg5-color);
    color: var(--text1-color);
}

#container {
    display: flex;
    flex-direction: column; /* important! stack panels vertically */
    height: 100vh;
    width: 100vw;
}

/* Menu Panel */
#menu-panel {
    height: 40px;
    width: 100%;
    background-color: var(--bg1-color);
    color: var(--text2-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
}

/* Menu Bar */
#menu-bar {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif; /* Use Arial font */
}

#desktop-menu-bar{
    flex: 1;
    display: flex;
    align-items: flex-end;
    height: 100%;
}

#mobile-menu-bar{
    flex: 1;
    display: flex;
    align-items: flex-end;
    height: 100%;
}

#menu-bar #divisor {
    flex: 1;
}

#menu-bar ul {
    list-style: none;
    display: flex;
    gap: 0px;
    height: 100%;
}

#menu-bar ul li {
    position: relative;
    display: flex;
    align-items: center; /* Center text vertically */
    justify-content: center; /* Center text horizontally */
    height: 100%;
}

#menu-bar .btn {
    text-decoration: none;
    color: var(--text2-color);
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar li:hover {
    background-color: var(--bg2-color);
}

#menu-bar .dropbtn {
    text-decoration: none;
    color: var(--text2-color);
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    background-color: var(--bg1-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
    min-width: 150px;
    max-width: 90vw;
    overflow-x: auto;
    left: 0px;
    transform: translateX(-50%);
    overflow-x: auto;
    box-sizing: border-box;
}

#menu-bar .dropdown-content a {
    display: block;
    text-decoration: none;
    color: var(--text2-color);
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
}

#menu-bar .dropdown-content a:hover {
    background-color: var(--bg2-color);
}

#menu-bar .dropdown:hover .dropdown-content {
    display: block;
}

#menu-bar ul li.not-selectable:hover,
#menu-bar ul li.not-selectable .btn:hover,
#menu-bar ul li.not-selectable .dropbtn:hover {
    background-color: inherit !important;
    cursor: default !important;
}

/* Wrapper to combine input + button */
.search-wrapper {
    display: inline-flex;           /* place input and button side by side */
    border-radius: 20px;            /* rounded container */
    overflow: hidden;               /* clip borders */
    border: 2px solid var(--bg2-color);         /* outer border */
    background: var(--bg3-color);               /* background for entire bar */
    height: 30px;
    margin-bottom: 5px;
    flex:1;
}

/* Input styling */
.search-wrapper input {
    border: none;                   /* remove individual border */
    outline: none;
    padding: 0 15px;
    height: 30px;
    color: var(--text1-color);
    background: transparent;         /* inherit wrapper background */
    flex: 1;                         /* take all available space */
    transition: background 0.3s, border-color 0.3s;
}

/* Input hover/focus inside the wrapper */
.search-wrapper input:hover {
    background-color: var(--bg4-color);
}
.search-wrapper input:focus {
    background-color: var(--bg5-color);
}

/* Button styling */
.search-wrapper button {
    border: none;
    outline: none;
    background: var(--bg3-color);               /* match wrapper */
    color: var(--text1-color);
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

/* Button hover effect */
.search-wrapper button:hover {
    background-color: var(--search-btn-hover-bg-color);
    border-left: 1px solid var(--bg2-color);   /* subtle line separating input/button */
}

#project-container {
    position:relative;
    display:flex;
    flex-direction: row;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-top: 40px;
    margin-left: 100px;
    margin-right: 100px;
    gap:20px;
}
#interaction {
    flex:1;
    border:2px solid var(--bg7-color);
    border-radius: 10px;
    transition: all 0.4s ease;
}

#project-title {
    padding: 10px;
    justify-self: center;
}

/* Runner Panel */
#runner-panel {
    height: 50px;
    width: 100%;
    background-color: var(--bg3-color);
    color: var(--text2-color);
    display: flex;
    align-items: center;
    justify-content: center; /* Center all children horizontally */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 500;
    position: sticky;
    top: 0;
    padding: 5px 10px;
    border-bottom: 1px solid var(--bg1-color);
    gap: 10px;
    flex-wrap: wrap;
    border-radius: 10px 10px 0px 0px;
}

#runner-panel input[type="text"] {
    flex: 1;
    padding: 5px 10px;
    font-size: 0.9rem;
    border: 1px solid var(--bg2-color);
    border-radius: 4px;
    background-color: var(--bg5-color);
    color: var(--text1-color);
    outline: none;
}

#runner-panel .patch {
    flex: 1;
    padding: 5px 10px;
    outline: none;
}

#runner-panel input[type="text"]::placeholder {
    color: var(--bg8-color);
}

#runner-panel select {
    padding: 5px 10px;
    font-size: 0.9rem;
    border: 1px solid var(--bg2-color);
    border-radius: 4px;
    background-color: var(--bg5-color);
    color: var(--text1-color);
    outline: none;
}

#runner-panel .group {
    display: flex;
    gap: 2px;
    background-color: var(--bg2-color);
    padding: 0px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#runner-panel button {
    padding: 0px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50%;
    background-color: var(--bg2-color);
    color: var(--text2-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

#runner-panel button:hover {
    background-color: var(--bg7-color);
}

#runner-panel button:active {
    background-color: var(--bg8-color);
}

#runner-paner button img {
    align-self: center;
    justify-self: center;
}

#iframe-container {
    transition: all 0.4s ease;
}

#metrics {
    position:relative;
    display:flex;
    flex-direction: row;
    gap:50px;
    padding:10px;
    font-size: 14px; /* or whatever fits your design */
    justify-items: center;
    align-items: center;
}

.metric-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

#metrics .group{
    display: flex;
    flex-direction: row;
    gap:5px;
    justify-items: center;
    align-items: center;
    background-color: var(--bg2-color);
    padding: 0px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#metrics button{
    padding: 0px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50%;
    background-color: var(--bg2-color);
    color: var(--text2-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

#metrics button:hover{
    background-color: var(--bg7-color);
}

#metrics button:active{
    background-color: var(--bg8-color);
}

#metrics .dropdown{
    position:relative;
    padding: 0px;
    color: var(--text2-color);
    display:flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    z-index: 10;
    will-change: transform, background-color;
    border-radius: 0 20px 20px 0;
}

#metrics .dropdown:hover {
    background-color: var(--bg6-color);
    transition: all 0.3s ease;
}


#metrics .dropbtn{
    position:absolute;
    text-decoration: none;
    color: var(--text2-color);
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center; /* Center text */
    padding: 0;
    width: 35px;
    height: 35px;
}

#metrics .dropdown-content {
    display: none;
    position: relative;
    bottom:35px;
    background-color: var(--bg1-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    z-index: 1000;
    left: 0px;
}

#metrics .dropdown-content a {
    padding: 0px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50%;
    background-color: var(--bg2-color);
    color: var(--text2-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

#metrics .dropdown-content a:hover {
    background-color: var(--bg7-color);
}

#metrics .dropdown:hover .dropdown-content {
    display:block;
}


#spacer {
    flex:1;
}

#project-info {
    position:relative;
    display:flex;
    flex-direction: column;
    border: 2px solid var(--bg7-color);
    border-radius: 10px 10px;
    background:var(--bg1-color);
    width:300px;
}
#project-info .profile {
    display:flex;
    height:70px;
    padding:10px;
    /*border:2px solid #555;/**/
    background: var(--bg3-color);
    border-radius: 10px 10px 0px 0px;
    justify-content: center;
    align-items: center;
    text-align: center;
    color:var(--text2-color);
    gap:5px;
}
#project-info .profile img {
    border-radius: 50%;
}
#project-info .description {
    flex:1;
    padding:10px;
    /*border:2px solid #555;/**/
}
#project-info .instructions {
    flex:1;
    padding:10px;
    /*border:2px solid #555;/**/
    border-radius: 0px 0px 10px 10px;
}

#bottom {
    position:relative;
    display:flex;
    flex-direction: row;
    margin-left: 100px;
    margin-right: 100px;/**/
}

#comments-section {
    flex:1;
}

#other-proyects {
    /*margin:10px;/**/
    width:300px;
    background: var(--bg4-color);
    border-radius: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 10px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 1 / 1;
    background-color: var(--bg5-color);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.project-card .thumbnail-container {
    flex: 1; /* takes up all remaining space */
    display: flex;
    align-items: center;
    justify-items: center;
    align-content: center;
    justify-content: center;
    overflow: hidden;
}

.project-card .thumbnail-container a {
    display: flex;
    width: 100%;
}

.project-card img {
    width: 100%;
}

.project-card .project-info{
    background-color: var(--bg3-color);
    position: inherit;
    padding: 10px;
    display: flex;             /* make the info a flex container */
    justify-content: space-between; /* pushes content to sides */
    align-items: flex-start;    /* align logo to top of info block */
    gap: 10px; 
}

.project-info-left {
    display: flex;
    flex-direction: column;     /* stack title and tabs vertically */
    gap: 5px;                   /* space between title and tabs */
}

.project-info-left a {
    color: var(--text2-color);
}

.project-info .tags {
    display: flex;              /* row of tabs */
    flex-wrap: wrap;
    gap: 5px;                   /* space between each tab */
    /*max-width: calc(100% );/**/
}

.project-info .tags .tag {
    padding-left: 5px;
    padding-right: 5px;
    background: var(--search-btn-hover-bg-color);
    border-radius: 10px;
}

.user-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;             /* don’t shrink logo */
}

.hidden {
    display: none !important;
}

/*Ads*/

#content {
    display:flex;
    flex-direction: row;
}

main {
    flex: 1;
}

/*#leftAds-div {
    margin-top: 40px;
    padding: 10px;
}*/

#rightAds-div {
    margin-top: 40px;
    padding: 10px;
}

/* Generic ad wrapper (keeps layout space) */
.ad-wrapper {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* The visible placeholder box */
.ad-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    border: 2px dashed var(--text1-color);/*rgba(0,0,0,0.12);*/
    background: linear-gradient(180deg, rgba(0,0,0,0.01), var(--text1-color));
    padding: 8px;
    min-height: 60px;
    color: var(--text1-color);/*rgba(0,0,0,0.6);*/
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    gap: 6px;
    position: sticky;
    top: 40px;
}

/* small label in corner */
.ad-placeholder .ad-label{
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* optional size text */
.ad-placeholder .ad-size{
    font-size: 12px;
    opacity: 0.9;
}

/* Predefined sizes (desktop-first). Adjust or add sizes as needed. */
.ad-160x600 .ad-placeholder{ width:160px; height:600px; min-height:600px; }
.ad-300x600 .ad-placeholder{ width:300px; height:600px; min-height:600px; }
.ad-300x250 .ad-placeholder{ width:300px; height:250px; min-height:250px; }

/* Responsive behavior: collapse to fluid on small screens */
@media (max-width: 720px){
    .ad-160x600 .ad-placeholder,
    .ad-300x600 .ad-placeholder,
    .ad-300x250 .ad-placeholder {
        width: 100%;
        height: auto;
        min-height: 90px;
    }
}