#opera-window {
    height: 700px;
    width: 600px;
    background-color: var(--color-background);

    /* resizing constraints */
    min-width: 470px;
    min-height: 350px;
    max-width: 100vw;
    max-height: calc(100vh - 39px);
    border: 2px solid var(--color-background);
    border-bottom-width: 8px;

    /* variables */
    --border-radius-edges: 4px;
    --color-background: rgb(20, 3, 16);
    --color-highlight: rgb(168, 84, 136);
    --color-secondary: rgb(83, 40, 73);
    --color-text: rgba(255, 255, 255, 0.6);
    --color-text-highlight: rgba(255, 255, 255, 0.7);
}
.opera.base {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
#border-gradient {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    padding: 2px;
    background: linear-gradient(
        to bottom right,
        var(--color-highlight) 0%,
        var(--color-highlight) 15%,
        var(--color-background) 45%,
        var(--color-background) 100%
    );
}
#background {
    width: 100%;
    height: 100%;
    padding: 4px;
    border-radius: var(--border-radius-edges);
    background-color: var(--color-background);
}
/* -------window header------- */
#opera-header {
    display: flex;
    height: 40px;
    justify-content: space-between;
    align-items: center;
}
#opera-header .window-controls {
    color: var(--color-highlight) !important;
}

/* window controls */
#opera-window-controls button {
    margin: 0;
}
#home-page-button, #opera-window-controls button {
    width: 35px;
    height: 35px;
}
#home-page-button {
    margin-left: 5px;
}
#home-page-button svg {
    height: 16px;
    width: 16px;
    margin: auto;
    fill: var(--color-highlight);
}

/*----- tabs -----*/
.tab-list {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.tab {
    flex: 1 1 0;
    position: relative;
    min-width: 60px;
    max-width: 200px;
    padding-left: 10px;
    border-radius: var(--border-radius-edges);
    color: var(--color-highlight);
    font-size: .9rem;
    overflow: hidden;
    white-space: nowrap;
}
.tab svg {
    height: 16px;
    width: 16px;
    margin-right: 5px;
}
.tab span {
    flex: 1;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    text-align: left;
}
.tab span::before,
.tab span::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1.5em;
    pointer-events: none;
    transition: opacity .35s ease;
}
.tab span::before {
    background: linear-gradient(
        to right, 
        transparent 60%, 
        var(--color-background) 100%
        );
    opacity: 1;
}
.tab span::after {
    background: linear-gradient(
        to right, 
        transparent 60%, 
        var(--color-secondary) 100%
        );
    opacity: 0;
}
.tab:hover span::after {
    opacity: 1;
}
.tab:hover span::before {
    opacity: 0;
}
.tab.active {
    background-color: var(--color-highlight);
    color: var(--color-background);
    font-weight: bold;
}
.tab:hover {
    color: var(--color-text-highlight);
}
.tab.active{
    background-color: var(--color-highlight);
    font-weight: bold;
}
/* close tab */
.close-tab {
    display: none;
    border-radius: 4px;
    height: 20px;
    width: 20px;
    padding: 2px;
    margin: 5px;
    color: #ffffff;
    background-color: transparent;
    box-sizing: border-box;
    line-height: 0;
}
.tab:hover .close-tab {
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-tab svg {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0;
}

.close-tab:hover {
    background-color: var(--color-highlight);
}

/*----- url bar -----*/
#url-bar {
    height: 30px;
    width: 100%;
    border: none;
    color: white;
    font-size: 10px;
    margin-bottom: 3px;
}

/*----- bookmark -----*/
.bookmarks {
    display: flex;
    margin-bottom: 3px;
}
.bookmark svg, .tab svg {
    height: 16px;
}
.bookmark span {
    font-size: 0.9rem;
    margin-left: 5px;
}
.bookmark {
    color: var(--color-highlight);
    padding: 0 10px;
}

/*----- base page settings -----*/
.webpage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.webpage iframe {
    flex: 1 1 auto;
    background: var(--color-background);
    border: none;
    overflow-x: hidden;
}
/* hover transitions/common styling */
.bookmark, .tab, #home-page-button, #url-bar, #opera-window-controls button {
    display: flex;
    align-items: center;
    height: 35px;
    border-radius: var(--border-radius-edges);
    background-color: transparent;
    transition: background-color ease-in 0.15s;
}

.bookmark:hover, .tab:hover, #home-page-button:hover, #url-bar:hover, #opera-window-controls button:hover {
    background-color: var(--color-secondary);
}

@media (max-width: 600px) {
    #opera-window {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: calc(100vh - 80px); /* leave room for taskbar */
        min-width: auto;
        min-height: auto;
        border-radius: 0;
        padding: 0;
    }

    /* smaller header */
    #opera-header {
        height: 30px;
    }

    /* main game area - vertical stack */
    .opera.base {
        flex: 1;
        display: flex;
        border-radius: 10px;
        height: 100%;
        width: 100%;
    }
    .webpage {
        margin-top: 5px;
    }
    .webpage iframe {
        background: var(--color-background);
    }
}


