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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    padding: 20px;
    min-height: 100vh;
}

header {
    margin-bottom: 25px;
    text-align: center;
}

header h1 a {
    color: #58a6ff;
    text-decoration: none;
    font-size: 2rem;
}

header p {
    color: #8b949e;
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Layout Principal com Barra Lateral */
.app-layout {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

/* Barra Lateral de Histórico */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
}

.sidebar h3 {
    font-size: 1rem;
    color: #f0f6fc;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-list {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    padding: 8px 10px;
    border-bottom: 1px solid #21262d;
    border-radius: 4px;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.history-item:hover {
    background: #21262d;
}

.history-item a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item .time {
    font-size: 0.75rem;
    color: #8b949e;
    display: block;
    margin-top: 2px;
}

.empty-history {
    color: #8b949e;
    font-size: 0.85rem;
    font-style: italic;
}

/* Conteúdo Principal */
.main-content {
    flex-grow: 1;
    width: 100%;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
}

.card h2 {
    color: #f0f6fc;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

label {
    display: block;
    color: #8b949e;
    font-size: 0.85rem;
    margin: 10px 0 5px;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.95rem;
    outline: none;
}

textarea {
    font-family: monospace;
    resize: vertical;
}

input:focus, textarea:focus, select:focus {
    border-color: #58a6ff;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #238636;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: #2ea043;
}

.btn-secondary {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
}

.btn-secondary:hover {
    background: #30363d;
}

.btn-danger {
    background: transparent;
    color: #f85149;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-danger:hover {
    text-decoration: underline;
}

.paste-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.actions {
    display: flex;
    gap: 8px;
}

.meta {
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #21262d;
}

pre {
    background: #0d1117;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
}

.error-card {
    border-color: #f85149;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #238636;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

.toast.show {
    display: block;
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column-reverse;
    }
    .sidebar {
        width: 100%;
    }
}