/* catppuccin */
:root.mocha {
    --base: #5F6382;
    --mantle: #181825;
    --surface0: #313244;
    --surface1: #45475a;
    --text: #cdd6f4;
    --subtext: #a6adc8;
    --primary: #b4befe;
    --secondary: #cba6f6;
}

:root.latte {
    --base: #B8BCFF;
    --mantle: #e6e9ef;
    --surface0: #ccd0da;
    --surface1: #bcc0cc;
    --text: #4c4f69;
    --subtext: #6c6f85;
    --primary: #7287fd;
    --secondary: #8839ef;
}

:root.hacker {
    --mantle: #000;
    --surface0: #000;
    --surface1: #000;
    --text: #fff;
    --subtext: #aaa;
    --primary: #0f0;
    --secondary: #f0f;
}

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

body {
    font-family: "JetBrains Mono", monospace;
    background-color: var(--base);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    line-height: 1.5;
    padding: 20px;
}

.hacker {
    background: none;
    background-image: url("./images/full-matrix.gif");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
:root.hacker {
    --glow-primary: rgba(0, 255, 0, 0.7);
    --glow-secondary: rgba(255, 0, 255, 0.5);
}

.hacker .box {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--glow-primary), inset 0 0 10px var(--glow-primary);
    border-radius: 0;
}

.hacker .box h1, 
.hacker a, 
.hacker button.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--glow-primary);
    border-radius: 0;
}
.hacker h1, 
.hacker a:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--glow-secondary);
}
.hacker .update {
    border-left: 2px solid var(--primary);
    box-shadow: -10px 0 10px -10px var(--glow-primary);
}

ul {
    list-style-type: square;
    padding-left: 20px;
}

ul li span {
    color: var(--text);
}

#container {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

#header {
    background-color: var(--mantle);
    text-align: center;
    vertical-align: center;
}

#header img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#flex {
    display: flex;
    flex-direction: row;
    padding: 20px 0;
    gap: 20px;
}

aside {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.box {
    background-color: var(--mantle);
    border: 2px solid var(--primary); 
    border-radius: 10px;
    padding: 25px 15px 15px 15px;
    position: relative;
    margin-top: 15px;
}

.box h1 {
    color: var(--primary);
    font-size: 1.5em;
    position: absolute;
    top: -15px; 
    left: 15px;
    
    background-color: var(--mantle);
    padding: 0 8px;
    border-radius: 10px;
    
    border-bottom: none;
    margin-bottom: 0;
}

.controls-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    flex: 1;
    background-color: var(--surface0);
    border: none;
    color: var(--text);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.2s;
}

a {
    color: var(--primary);
    font-weight: bold;
}
a:hover {
    color: var(--secondary);
}

button {
    position: relative;
    transition: background-color 0.3s ease;
    padding: 10px 40px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button::before, button::after {
    position: absolute;
    opacity: 0;
    transition: none;
}

button:hover {
    color: var(--secondary);
    background-color: var(--surface1);
}

button:hover::before { 
    content: ">"; 
    opacity: 1;
    left: 15px;
    animation: moveRight 0.3s infinite alternate ease-in-out;
}

button:hover::after { 
    content: "<"; 
    opacity: 1;
    right: 15px;
    animation: moveLeft 0.3s infinite alternate ease-in-out;
}

@keyframes moveRight {
    from { transform: translateX(0); }
    to { transform: translateX(4px); }
}
@keyframes moveLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-4px); }
}


button.active {
    background-color: var(--surface1);
    color: var(--primary);
}

main {
    flex: 1;
    min-height: 400px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: var(--secondary);
    font-size: 1.5em;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

.update {
    border-left: 2px solid var(--primary);
    padding-left: 10px;
    background-color: var(--surface0);
    padding: 10px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 10px;
}

.update strong {
    color: var(--pink);
}

code {
    display: block;
    background-color: var(--crust);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    color: var(--subtext);
    margin: 10px 0;
    text-align: left;
}

#buttons {
    background-color: var(--mantle);
    text-align: center;
    /* border-top: 2px solid var(--surface1); */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

@media only screen and (max-width: 700px) {
    #flex {
        flex-direction: column;
    }

    aside {
        width: 100%;
    }
}