:root {
    --bg-color:     #121212ff;
    --card-bg:      #1e1e1eff;
    --text-color:   #e0e0e0ff;
    --accent-color: #ffffffff;
    --border-color: #333333ff;
    --shadow-color: #00000080;

    font-family: 'Courier New', Courier, monospace;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px;
    text-align: center;
    background-color: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 100px;
    gap: 20px;
}

details {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    width: 20%;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

summary {
    cursor: pointer;
    outline: none;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
}

details[open] {
    width: 60%;
}

details[open] summary {
    border-bottom: 1px solid var(--border-color);
    justify-content: left;
    padding-bottom: 10px;
    margin-bottom: 15px;
    width: 100%;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

canvas {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    background-color: black;
    image-rendering: pixelated;
    max-width: 100%;
    height: auto !important;
}

#btns {
    display: flex;
    gap: 15px;
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

button svg {
    width: 24px;
    height: 24px;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

button:active {
    transform: scale(0.95);
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}
.btn-primary:hover {
    background-color: white;
}

.btn-danger:hover {
    color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
}

.hidden {
    display: none;
}

footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
    padding: 15px;
    text-align: center;
    width: 100%;
    font-size: 0.8rem;
    box-sizing: border-box;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
    transition: color 0.2s;
}

footer a:hover {
    color: white;
    border-bottom: 1px solid white;
}

@media (max-width: 920px) {
    header h1 {
        font-size: 1.2rem;
    }

    details {
        width: 90%;
    }

    details[open] {
        width: 90%;
    }

    #btns {
        width: 90%;
        justify-content: space-around;
    }
}
