/* Scoped styles for Base64 App */

:root {
    --b64-bg: rgba(23, 23, 23, 0.7);
    /* Darker Neutral */
    --b64-primary: #f59e0b;
    /* Amber-500 */
    --b64-primary-hover: #d97706;
    /* Amber-600 */
    --b64-border: rgba(255, 255, 255, 0.1);
}

.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-card {
    background: var(--b64-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--b64-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 1000px;
    /* Slightly wider for text comparisons */
    overflow: hidden;
    min-height: 600px;
    margin-top: 2rem;
}

/* Common Section Styles */
.io-section {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Left Section */
.io-section:first-child {
    border-right: 1px solid var(--b64-border);
}

.output-section {
    background: rgba(0, 0, 0, 0.2);
}

.brand {
    margin-bottom: 2rem;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    /* Amber gradients */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.full-height {
    height: 100%;
    margin-bottom: 0;
}

.input-group label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--b64-border);
    padding: 1rem;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: 'Courier New', Courier, monospace;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    flex: 1;
    resize: none;
    line-height: 1.5;
}

textarea:focus {
    border-color: var(--b64-primary);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

button {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

#encode-btn {
    background: linear-gradient(135deg, var(--b64-primary), var(--b64-primary-hover));
    color: white;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--b64-border);
    color: #e2e8f0;
}

button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #cbd5e1;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--b64-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    flex: 0;
}

.icon-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
    }

    .io-section:first-child {
        border-right: none;
        border-bottom: 1px solid var(--b64-border);
    }

    textarea {
        min-height: 200px;
    }
}