/* Base64 Encoder/Decoder Styles */
.base64-wrapper {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.base64-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.base64-header {
    text-align: center;
    margin-bottom: 30px;
}

.base64-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
}

.base64-header .subtitle {
    color: #666;
    font-size: 16px;
}

/* Tabs */
.base64-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.tab-btn.active {
    background: #ff7a18;
    color: white;
}

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

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid Layout */
.base64-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.input-section, .output-section {
    display: flex;
    flex-direction: column;
}

.input-section label, .output-section label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}

.input-section textarea, .output-section textarea {
    width: 100%;
    min-height: 250px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
    background: #fafafa;
}

.input-section textarea:focus {
    border-color: #ff7a18;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.1);
}

.output-section textarea {
    background: #f8f9fa;
    color: #333;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.button-group button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
    min-width: 100px;
}

.btn-encode {
    background: #28a745;
    color: white;
}

.btn-encode:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-decode {
    background: #17a2b8;
    color: white;
}

.btn-decode:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-clear {
    background: #dc3545;
    color: white;
}

.btn-clear:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-copy {
    background: #6c757d;
    color: white;
}

.btn-copy:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-download {
    background: #007bff;
    color: white;
}

.btn-download:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* File Drop Zone */
.file-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-drop-zone:hover {
    border-color: #ff7a18;
    background: #f5f5f5;
}

.file-drop-zone.dragover {
    border-color: #ff7a18;
    background: #fff3e6;
}

.file-drop-zone i {
    font-size: 48px;
    color: #999;
    margin-bottom: 10px;
}

.file-drop-zone p {
    color: #666;
    margin: 0;
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#fileInfo, #imagePreview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#fileInfo p {
    margin: 5px 0;
    color: #333;
}

#fileInfo strong {
    color: #555;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 280px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    font-size: 14px;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* Responsive */
@media (max-width: 992px) {
    .base64-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .base64-wrapper {
        padding: 10px;
    }
    
    .base64-container {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .base64-header h1 {
        font-size: 22px;
    }
    
    .base64-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
        min-width: 80px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .input-section textarea, .output-section textarea {
        min-height: 150px;
    }
    
    .file-drop-zone {
        padding: 20px;
        min-height: 100px;
    }
    
    .file-drop-zone i {
        font-size: 32px;
    }
}