/* Custom CSS for AI Writing Assistant */

/* Font Family */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #e8eaf6); /* Light blue to light indigo gradient */
}

/* Card Styling */
.card {
    border-radius: 1.5rem !important; /* More rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Softer, larger shadow */
    overflow: hidden; /* Ensures rounded corners clip content */
}

/* Headings and Labels */
.text-dark-blue {
    color: #2c3e50; /* A dark, professional blue */
}

h1 {
    font-size: 2.5rem; /* Larger heading for impact */
    font-weight: 800; /* Extra bold */
    letter-spacing: -0.03em; /* Tighten letter spacing */
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
}

/* Textarea Styling */
textarea.form-control {
    border: 1px solid #ced4da;
    padding: 1rem;
    font-size: 1rem;
    min-height: 150px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    resize: vertical; /* Allow vertical resizing */
}

textarea.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Filter Buttons */
.filter-btn {
    border: 1px solid #0d6efd;
    color: #0d6efd;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    white-space: nowrap; /* Prevent wrapping on small screens */
}

.filter-btn:hover {
    background-color: #e7f1ff; /* Light blue hover */
    color: #0d6efd;
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: linear-gradient(45deg, #0d6efd, #6610f2); /* Blue to indigo gradient */
    color: white;
    border-color: transparent;
    transform: scale(1.05); /* Slightly larger when active */
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Rewrite Button */
.btn-gradient {
    background: linear-gradient(90deg, #0d6efd, #6610f2); /* Blue to indigo gradient */
    border: none;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    background: linear-gradient(90deg, #0a58ca, #560ce0); /* Darker gradient on hover */
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-gradient:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Copy Button */
#copyBtn {
    background-color: #0d6efd;
    border: none;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#copyBtn:hover {
    background-color: #0a58ca;
    transform: translateY(-1px);
}

/* Copy Success Message Animation */
.copy-success-message {
    animation: fadeOut 2s forwards;
    opacity: 1;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 10; /* Ensure it's above other elements */
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1.5rem !important;
    }
    h1 {
        font-size: 2rem;
    }
    .fs-5 {
        font-size: 1.1rem !important;
    }
    .filter-btn {
        width: 100%; /* Full width buttons on small screens */
    }
    .d-flex.flex-wrap.gap-2 {
        flex-direction: column;
    }
    #copyBtn {
        position: static !important; /* Make copy button static on small screens */
        width: fit-content;
        margin-top: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
    }
    .position-relative {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
