/* Base64 Encoder/Decoder Styles */

.base64-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-selector label {
    font-weight: 600;
    color: #343541;
    font-size: 1.05rem;
}

.button-group {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.mode-btn, .operation-btn {
    background-color: #f5f7f9;
    border: none;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem;
}

.mode-btn:first-child, .operation-btn:first-child {
    border-right: 1px solid #ddd;
}

.mode-btn:hover, .operation-btn:hover {
    background-color: #e9ecef;
}

.mode-btn.active, .operation-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Mode Panels */
.mode-panel {
    display: none;
}

.mode-panel.active {
    display: block;
}

/* Operation Selector */
.operation-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Editor Container */
.editor-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.editor-panel {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-panel h3 {
    background-color: #f5f7f9;
    padding: 0.85rem 1.25rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #ddd;
    color: #343541;
}

textarea {
    width: 100%;
    min-height: 200px;
    border: none;
    resize: vertical;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

textarea:focus {
    outline: none;
}

#output-area, #file-output {
    background-color: #f8f9fa;
}

.panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background-color: #f5f7f9;
    border-top: 1px solid #ddd;
}

.action-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#options-panel {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    color: #343541;
    cursor: pointer;
}

#status-message {
    font-size: 0.8rem;
    color: #666;
}

.status-success {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

/* File Upload Section */
.file-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.file-upload-box {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(58, 134, 255, 0.05);
}

.upload-icon {
    color: #888;
    margin-bottom: 1rem;
}

.upload-text {
    color: #555;
    margin-bottom: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* File Result Section */
.file-result-section {
    margin-top: 2rem;
}

.file-result-section h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #343541;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.file-result-area {
    margin-bottom: 1rem;
}

.file-result-area textarea {
    width: 100%;
    min-height: 150px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.file-result-actions {
    display: flex;
    gap: 1rem;
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.info-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-item h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 600;
}

.info-item p, .info-item ul {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.info-item ul {
    padding-left: 1.5rem;
}

/* Button Styles */
.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(58, 134, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }
    
    .action-controls {
        flex-direction: row;
        justify-content: center;
        margin: 1rem 0;
    }
    
    .operation-selector {
        margin-top: 1rem;
    }
}