/* Base64 Encoder/Decoder Styles */

/* Card styles */
.encode-card, .decode-card, .info-card {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.encode-card:hover, .decode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
}

/* File upload styles */
.file-upload-label {
    cursor: pointer;
    margin: 0;
    font-size: 1.2rem;
    color: white;
    transition: all 0.2s ease;
}

.file-upload-label:hover {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Button styles */
.encode-btn, .decode-btn {
    border-radius: 30px;
    font-weight: 600;
    padding: 12px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.encode-btn:hover, .decode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.encode-btn:active, .decode-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add a subtle animation effect to buttons */
.encode-btn::after, .decode-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.encode-btn:focus::after, .decode-btn:focus::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Copy button styles */
.copy-btn {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

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

/* Form control styles */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Select styles */
.form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-position: right 15px center;
}

.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Visual feedback for file selection */
.file-selected {
    animation: pulse 2s;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Visual feedback for encoding type change */
.changed {
    animation: highlight 0.5s;
}

@keyframes highlight {
    0% {
        background-color: rgba(0, 123, 255, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

/* Info section styles */
.info-card ul {
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .encode-card, .decode-card {
        margin-bottom: 30px;
    }

    .encode-btn, .decode-btn {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 12px 15px;
    }

    .card-body {
        padding: 15px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    .encode-btn, .decode-btn {
        font-size: 1rem;
        padding: 8px 12px;
    }
}
