:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg: #ffffff;
    --text: #1f2937;
    --border: #e5e7eb;
    --radius: 8px;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 1rem;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
}

.steg-container {
    width: 100%;
    max-width: 600px;
    background: white;
}

h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #4b5563;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

/* Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.step {
    margin-bottom: 1rem;
}

/* Inputs */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
    color: #6b7280;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button#encodeBtn,
button#decodeBtn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background: var(--primary-hover);
}

/* Results */
.result-area {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.result-area.hidden {
    display: none;
}

canvas {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.download-link:hover {
    background: #059669;
    transform: translateY(-1px);
}

.char-count {
    text-align: right;
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Stock Gallery */
/* Stock Quick Pick */
/* Split View Selection */
.selection-split {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.split-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.split-divider {
    font-weight: bold;
    color: #9ca3af;
    font-size: 0.8rem;
    padding: 0 5px;
}

/* Tweaks for Split Layout */
.drop-zone {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    height: 140px;
    /* Fixed height to match stock grid */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
    /* Remove default margin */
}

.drop-zone .icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stock-col .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 5px;
}

.stock-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #f3f4f6;
}

.stock-thumb:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.stock-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 5px;
}