/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #0b1f14;
    color: #e5f5ec;
    min-height: 100vh;
    overflow: hidden;
}

/* Partículas */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -10px;
    background: rgba(34, 197, 94, 0.7);
    border-radius: 50%;
    animation-name: floatUp;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes floatUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-110vh);
        opacity: 0;
    }
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.header i {
    font-size: 48px;
    color: #22c55e;
}

.header h1 {
    font-size: 36px;
}

/* Card */
.card {
    background: rgba(15, 54, 35, 0.9);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card h2 {
    margin-bottom: 12px;
}

.description {
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Edição */
.edit-btn {
    background: #16a34a;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.edit-btn:hover {
    background: #15803d;
}

#edit-form {
    display: none;
}

#description-input {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    margin-bottom: 10px;
}

.form-actions button {
    margin-right: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.save-btn {
    background: #22c55e;
    color: #062e18;
    font-weight: bold;
}

.cancel-btn {
    background: #dc2626;
    color: #fff;
}



.code-section {
    margin: 80px auto;
    max-width: 800px;
}

.code-display {
    background: #0b1f14;
    color: #e5e7eb;
    padding: 25px;
    border-radius: 10px;
    font-family: "Fira Code", monospace;
    font-size: 14px;
    line-height: 1.6;

    /* >>> ajustes importantes <<< */
    max-height: 420px;
    /* controla o tamanho visível */
    overflow-y: auto;
    /* ativa scroll vertical */
    overflow-x: auto;
    /* evita quebra feia de linhas longas */
}


/* Linhas */
.code-line {
    white-space: nowrap;
}

/* Cores de syntax */
.keyword {
    color: #38bdf8;
}

.function {
    color: #a78bfa;
}

.string {
    color: #4ade80;
}

.comment {
    color: #94a3b8;
    font-style: italic;
}

.number {
    color: #facc15;
}

.variable {
    color: #e5e7eb;
}

.decorator {
    color: #fb7185;
}

/* Cursor piscando */
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #e5e7eb;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.code-display::-webkit-scrollbar {
    width: 8px;
}

.code-display::-webkit-scrollbar-thumb {
    background: rgba(15, 54, 35, 0.9);
    border-radius: 6px;
}

.code-display::-webkit-scrollbar-track {
    background: transparent;
}