/* public/css/styles.css */
/* ============================
   CSS Variables and Root Definitions
   ============================ */

/* Import Arabic font */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

:root {
    --primary-blue: #0078D7;
    --dark-blue: #003E75;
    --light-blue: #61B3FF;
    --light-gray: #F4F7FB;
    --white-color: #ffffff;
    --button-hover: #00A6FB;
    --danger-red: #e63946;
    --warning-yellow: #ffc107;
    --success-green: #28a745;
    --secondary-blue: #c82333;
    --font-primary: 'Poppins', sans-serif;
    --font-arabic: 'Tajawal', sans-serif;
}

/* ============================
   General Styling
   ============================ */

/* Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Ensure html takes full height */
html {
    height: 100%;
}

/* Reset and Base Styles */
body {
    display: flex; /* Make body a flex container */
    flex-direction: column; /* Arrange children vertically */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    padding-top: 70px; /* Space for fixed navbar */
    font-family: var(--font-primary);
    color: #333;
    scroll-behavior: smooth;
    margin: 0; /* Remove default margin */
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    flex: 1; /* Allow container to grow and take up available space */
}

/* ============================
   Navbar Styling
   ============================ */

.navbar {
    background-color: var(--dark-blue);
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: 1px;
    color: #ffffff; /* White text for brand */
}

.navbar-nav {
    border-bottom: 2px solid var(--primary-blue); /* Tab-like bottom border */
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: #ffffff; /* White text for links */
    font-size: 1rem;
    padding: 10px 15px;
    margin: 0 10px;
    border: 1px solid transparent;
    border-bottom: none;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
    border-radius: 5px 5px 0 0; /* Rounded top corners for tab effect */
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue); /* Primary blue on hover */
    border-color: var(--primary-blue); /* Add border to emphasize hover */
    background-color: rgba(255, 255, 255, 0.1); /* Slight background change on hover */
}

.navbar-nav .nav-link.active {
    color: var(--primary-blue); /* Primary blue for active link */
    background-color: var(--white-color); /* White background for active tab */
    border-color: var(--primary-blue) var(--primary-blue) var(--white-color); /* Full border except bottom */
}

.navbar-toggler {
    border: none;
    background-color: var(--primary-blue); /* Primary blue for mobile menu button */
    color: #ffffff;
    transition: background-color 0.3s ease;
}

.navbar-toggler:hover {
    background-color: var(--button-hover); /* Lighter blue on hover */
}

.navbar-collapse {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        text-align: center;
        border-bottom: none; /* Remove bottom border on mobile */
    }

    .navbar-nav .nav-link {
        margin: 5px 0;
        border-radius: 0; /* Remove border-radius on mobile */
    }

    .navbar-collapse {
        margin-top: 10px;
    }
}

/* ============================
   Button Styling
   ============================ */

.btn {
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: 0 5px 20px rgba(0, 120, 215, 0.4);
}

.btn-primary:hover {
    background-color: var(--button-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 166, 251, 0.5);
}

.btn-outline-light {
    border-color: var(--white-color);
    color: var(--white-color);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.btn-outline-light:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.5);
}

.btn-success {
    background-color: var(--success-green);
    border-color: var(--success-green);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

/* Updated Delete Button Styling */
.btn-delete {
    padding: 0.375rem 0.75rem; /* 6px 12px */
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
    border-radius: 0.25rem; /* 4px */
    background-color: var(--danger-red); /* #dc3545 */
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    cursor: pointer;
    width: auto;
}

.btn-delete:hover {
    background-color: #c82333; /* Darker shade on hover */
}

/* Ensure consistent spacing for buttons */
.btn-delete + .btn-edit {
    margin-left: 0.5rem;
}

.btn-warning.text-dark {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #343a40;
}

.btn-warning.text-dark:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Ensure buttons do not stretch */
.btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    /* Adjust Delete Button on Mobile */
    .btn-delete {
        padding: 0.25rem; /* 4px */
        font-size: 0.75rem; /* 12px */
        width: 35px;
        height: 35px;
        justify-content: center;
        align-items: center;
    }

    /* Dashboard Username Responsiveness */
    .dashboard-username {
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ============================
   Form Styling
   ============================ */

form {
    background-color: var(--light-gray);
    padding: 17px; /* Reduced padding to prevent conflict */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
    box-sizing: border-box;
}

form .form-group {
    position: relative;
    margin-bottom: 30px;
}

form .form-label {
    font-weight: 500;
}

form .form-control {
    border-radius: 5px;
}

input[type="text"],
textarea,
input[type="password"],
input[type="email"] {
    border: 2px solid #e0e0e0; /* Light border for inactive state */
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    font-size: 1.1rem;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

textarea {
    resize: vertical; /* Allow resizing vertically */
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 8px 15px rgba(0, 120, 215, 0.2);
    background-color: #f0f8ff;
}

.form-group label {
    position: absolute;
    top: 18px;
    left: 20px;
    font-size: 1rem;
    color: #888;
    transition: all 0.3s ease;
    pointer-events: none;
    background-color: #ffffff;
    padding: 0 5px;
    z-index: 0;
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label,
textarea:focus ~ label,
textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 15px;
    font-size: 0.85rem;
    color: var(--primary-blue);
    z-index: 1;
}

.btn-submit {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--success-green);
    border: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 120, 215, 0.4);
}

.btn-submit:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.6);
}

input.error,
textarea.error {
    border-color: var(--danger-red);
    background-color: #ffeeee;
}

input.error:focus,
textarea.error:focus {
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
}

.form-message {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--danger-red);
}

/* ============================
   Modal Styling
   ============================ */

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.modal-body p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* ============================
   Category, Tags, and Prompts Page Styling
   ============================ */

.category-list,
.tag-list,
.prompt-list {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: var(--white-color);
    padding: 20px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-gray);
}

.table td {
    font-size: 1.1rem;
}

a.btn {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================
   Hero Section - Landing Page
   ============================ */

/* Consolidated Hero Section Styles */
.container-fluid.hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--primary-blue); /* Base color */
}

/* Animated Geometric Shapes */
.container-fluid.hero-section::before,
.container-fluid.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    animation: floatShapes 20s linear infinite;
}

.container-fluid.hero-section::before {
    width: 250px;
    height: 250px;
    top: -120px;
    left: -120px;
    animation-delay: 0s;
}

.container-fluid.hero-section::after {
    width: 350px;
    height: 350px;
    bottom: -150px;
    right: -150px;
    animation-delay: 10s;
}

/* Hero Content */
.container-fluid.hero-section .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 20px;
    animation: fadeInContent 2s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
}

/* Headline Styling */
.container-fluid.hero-section .hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 1.5s ease-out forwards;
    opacity: 0;
    transform: translateX(-100px);
}

/* Subheadline Styling */
.container-fluid.hero-section .hero-content p {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
    animation: slideInRight 1.5s ease-out forwards;
    opacity: 0;
    transform: translateX(100px);
}

/* CTA Button Styling */
.container-fluid.hero-section .hero-content .btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    background-color: var(--white-color);
    color: var(--primary-blue);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 120, 215, 0.2);
    animation: fadeInButton 1.5s ease-out 1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* CTA Button Hover Effect */
.container-fluid.hero-section .hero-content .btn:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 120, 215, 0.3);
}

/* Ensure Floating Shapes are Visible on Mobile */
@media (max-width: 768px) {
    .container-fluid.hero-section::before,
    .container-fluid.hero-section::after {
        display: block !important;
    }
    
    /* Optional: Adjust Floating Shapes Size on Mobile */
    /* 
    .container-fluid.hero-section::before {
        width: 150px;
        height: 150px;
        top: -75px;
        left: -75px;
    }
    
    .container-fluid.hero-section::after {
        width: 200px;
        height: 200px;
        bottom: -100px;
        right: -100px;
    }
    */
}

/* ============================
   Animations
   ============================ */

/* Floating Shapes Animation */
@keyframes floatShapes {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(50px, 50px) rotate(180deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Fade In Content */
@keyframes fadeInContent {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right Animation */
@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Button */
@keyframes fadeInButton {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Features Section - Landing Page
   ============================ */

.features {
    background-color: #ffffff; /* Clean white background for contrast */
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 150%;
    height: 100%;
    background: linear-gradient(to bottom right, var(--primary-blue), var(--light-blue));
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    z-index: 0;
    opacity: 0.05;
}

.features h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 50px;
    color: var(--dark-blue);
    text-transform: none;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 3px 10px rgba(0, 120, 215, 0.2);
	line-height: 1.2; /* Improves readability */
}

.features h5 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--dark-blue);
    text-transform: none;
    letter-spacing: 1.5px;
    text-shadow: 0 3px 10px rgba(0, 120, 215, 0.2);
	line-height: 1.2; /* Improves readability */
}

.features .feature-box-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Existing gap for desktop view */
    position: relative;
    z-index: 1;
}

.features .feature-box {
    background: linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
    padding: 45px;
    width: 320px;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.features .feature-box::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background-color: rgba(97, 179, 255, 0.3);
    border-radius: 50%;
    z-index: 0;
    transition: transform 0.4s ease;
}

.features .feature-box:hover::before {
    transform: translate(-50px, 50px);
}

.features .feature-box:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 120, 215, 0.2);
}

.features .feature-icon {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.features p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0;
}

/* ============================
   Features Section - Landing Page Enhancements
   ============================ */

/* Center the entire Features section */
.features {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ensure feature-box-container centers its child feature-boxes */
.features .feature-box-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Existing gap for desktop view */
    width: 100%;
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    /* Features Section Mobile Adjustments */
    .features .feature-box-container {
        flex-direction: column; /* Stack feature boxes vertically */
        gap: 30px; /* Increased gap for better vertical spacing */
        align-items: center; /* Center items horizontally in column direction */
    }

    .features .feature-box {
        width: 100%;          /* Set feature boxes to 85% width */
        max-width: 100%;      /* Ensure they don't exceed 85% */
        margin: 0 auto;      /* Center the feature boxes */
        padding: 35px;       /* Slightly reduced padding for better fit */
        height: auto;        /* Allow height to adjust based on content */
    }

    /* Optional: Add additional margin-top if needed */
    /* .features .feature-box + .feature-box {
        margin-top: 20px;
    } */
}

/* ============================
   Call-to-Action (CTA) Section - Landing Page
   ============================ */

.cta {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
}

.cta::before,
.cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    animation: floating 6s ease-in-out infinite;
}

.cta::before {
    top: -100px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    animation: floating 6s ease-in-out infinite;
}

.cta::after {
    bottom: -150px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    animation: floating 8s ease-in-out infinite reverse;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
}

.cta h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: none;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cta p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #f0f0f0;
    position: relative;
    z-index: 1;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 40px;
}

.cta .btn,
.cta .btn-outline-light {
    padding: 15px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 30px;
    background-color: var(--white-color);
    color: var(--primary-blue);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 120, 215, 0.2);
    animation: fadeInButton 1.5s ease-out 1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* CTA Button Hover Effect */
.cta .btn:hover,
.cta .btn-outline-light:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 120, 215, 0.3);
}

.cta .btn-outline-light {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.cta .btn-outline-light:hover {
    background-color: #ffffff;
    color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .cta {
        clip-path: none;
    }
	
	.cta .btn {
    position: relative;
    z-index: 1;
	}
	
	.cta h2 {
        font-size: 2.5rem;
    }

    .cta p {
        font-size: 1.2rem;
    }

    .cta .btn,
    .cta .btn-outline-light {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
    
    /* Dashboard Username Responsiveness */
    .dashboard-username {
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ============================
   Dashboard Page Specific Styles
   ============================ */

/* Dashboard Hero Section */
.container.my-5 .hero-section.text-center.text-dark {
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue));
    color: #ffffff;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-bottom: none;
}

.container.my-5 .hero-section.text-center.text-dark h1.display-4 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.container.my-5 .hero-section.text-center.text-dark p.lead {
    font-size: 1.2rem;
    color: #f0f0f0;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Welcome Message */
.container.my-5 .row.mb-4 .col-12.text-center h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.container.my-5 .row.mb-4 .col-12.text-center p.text-muted {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Statistics Section */
.container.my-5 .row.my-5 .card.text-white {
    border: none;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.container.my-5 .row.my-5 .card.text-white.bg-primary {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.container.my-5 .row.my-5 .card.text-white.bg-success {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
}

.container.my-5 .row.my-5 .card.text-white.bg-warning {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.container.my-5 .row.my-5 .card.text-white:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.container.my-5 .row.my-5 .card-header {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.container.my-5 .row.my-5 .card-header i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.container.my-5 .row.my-5 .card-body {
    padding: 20px;
}

.container.my-5 .row.my-5 .card-body .card-title.display-6 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.container.my-5 .row.my-5 .card-body .card-text {
    font-size: 1rem;
    color: #ddd;
}

.container.my-5 .row.my-5 .card-body .badge.bg-info.text-dark {
    background-color: var(--light-blue);
    color: var(--dark-blue);
}

.container.my-5 .row.my-5 .card-body .badge.bg-secondary {
    background-color: var(--primary-blue);
}

.container.my-5 .row.my-5 .card-body .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.container.my-5 .row.my-5 .card-body .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.container.my-5 .row.my-5 .card-body .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.container.my-5 .row.my-5 .card-body .btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Recent Prompts Section */
.recent-prompts-section .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.recent-prompts-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
}

.recent-prompts-section .card-header.bg-light {
    background-color: var(--light-gray) !important;
    border-bottom: 3px solid var(--primary-blue);
    border-radius: 15px 15px 0 0;
}

.recent-prompts-section .card-header.bg-light h4 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--dark-blue);
}

.recent-prompts-section .card-body {
    padding: 25px;
}

.recent-prompts-section .card-body .badge.bg-info.text-dark {
    background-color: var(--light-blue);
    color: var(--dark-blue);
}

.recent-prompts-section .card-body .badge.bg-secondary {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.recent-prompts-section .card-body .badge:hover {
    background-color: var(--dark-blue);
    color: #ffffff;
}

.recent-prompts-section .card-body .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.recent-prompts-section .card-body .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.recent-prompts-section .card-body .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.recent-prompts-section .card-body .btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ============================
   Performance Metrics Section
   ============================ */

.performance-metrics-section .performance-metrics {
    background-color: var(--light-gray);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.performance-metrics-section .performance-metrics:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.performance-metrics-section .performance-metrics .card-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.performance-metrics-section .performance-metrics .card-title i {
    font-size: 2.5rem;
    margin-right: 12px;
    color: var(--primary-blue);
}

.performance-metrics-section .performance-metrics .card-text {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

.performance-metrics-section .performance-metrics .metrics-content h6 {
    font-size: 1.4rem;
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.performance-metrics-section .performance-metrics .metrics-content .mb-2 strong {
    color: var(--dark-blue);
}

.performance-metrics-section .performance-metrics .metrics-content .progress {
    height: 22px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.2);
}

.performance-metrics-section .performance-metrics .metrics-content .progress-bar.primary {
    background: linear-gradient(90deg, #1e3c72, #2a5298);
}

.performance-metrics-section .performance-metrics .metrics-content .progress-bar.success {
    background: linear-gradient(90deg, #56ab2f, #a8e063);
}

.performance-metrics-section .performance-metrics .metrics-content .progress-bar.warning {
    background: linear-gradient(90deg, #f7971e, #ffd200);
}

.performance-metrics-section .performance-metrics .metrics-content .metrics-list li i {
    color: var(--primary-blue);
}

.performance-metrics-section .performance-metrics .metrics-content .metrics-list li {
    margin-bottom: 12px;
}

/* ============================
   RTL Support
   ============================ */

html[lang="ar"] {
    direction: rtl;
}

html[lang="ar"] body {
    font-family: var(--font-arabic);
}

html[lang="ar"] .navbar-nav {
    border-bottom: 2px solid var(--primary-blue);
}

html[lang="ar"] .navbar-nav .nav-link {
    margin: 0 10px;
}

html[lang="ar"] .form-group label {
    left: auto;
    right: 20px;
}

html[lang="ar"] input:focus ~ label,
html[lang="ar"] input:not(:placeholder-shown) ~ label,
html[lang="ar"] textarea:focus ~ label,
html[lang="ar"] textarea:not(:placeholder-shown) ~ label {
    left: auto;
    right: 15px;
}

/* ============================
   Responsive Enhancements
   ============================ */

@media (max-width: 768px) {
    /* General Adjustments */
    .container.my-5 .row.my-5 .card.text-white {
        margin-bottom: 20px;
    }

    .performance-metrics-section .performance-metrics .metrics-content h6 {
        font-size: 1rem;
    }

    .performance-metrics-section .performance-metrics .metrics-content .progress-bar {
        height: 18px;
        font-size: 0.9rem;
    }

    /* Adjust Landing Page Hero Section for Mobile */
    .container-fluid.hero-section .hero-content h1 {
        font-size: 2.5rem;
    }

    .container-fluid.hero-section .hero-content p {
        font-size: 1.2rem;
    }

    .container-fluid.hero-section .hero-content .btn,
    .container-fluid.hero-section .hero-content .btn-outline-light {
        padding: 10px 30px;
        font-size: 1rem;
    }

    /* Hide Floating Shapes on Small Screens */
    .container-fluid.hero-section::before,
    .container-fluid.hero-section::after {
        display: none;
    }

    /* Features Section Mobile Adjustments */
    .features .feature-box-container {
        flex-direction: column;
        gap: 20px;
    }

    .features .feature-box {
        width: 90%;
        height: auto;
    }

    /* CTA Section Mobile Adjustments */
    .cta h2 {
        font-size: 2.5rem;
    }

    .cta p {
        font-size: 1.2rem;
    }

    .cta .btn,
    .cta .btn-outline-light {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
    
    /* Recent Prompts Section Responsive */
    .recent-prompts-section .card-body {
        padding: 20px;
    }

    .recent-prompts-section .card-body .card-title {
        font-size: 1.4rem;
    }

    .recent-prompts-section .card-body .card-text {
        font-size: 0.95rem;
    }

    .recent-prompts-section .card-body .badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* Performance Metrics Section Responsive */
    .performance-metrics-section .performance-metrics .card-title {
        font-size: 1.6rem;
    }

    .performance-metrics-section .performance-metrics .metrics-content h6 {
        font-size: 1rem;
    }

    .performance-metrics-section .performance-metrics .metrics-content .progress {
        height: 18px;
    }
    
    /* Dashboard Username Responsiveness */
    .dashboard-username {
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ============================
   Improved Prompt Card Styling
   ============================ */

/* Prompt Card Styling */
.prompt-card {
    border: none; /* Remove default border */
    border-radius: 15px; /* More rounded corners */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Enhanced shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Add a subtle gradient overlay */
.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 120, 215, 0.1), rgba(255, 255, 255, 0));
    z-index: 0;
    transition: background 0.3s ease;
}

.prompt-card:hover::before {
    background: linear-gradient(135deg, rgba(0, 120, 215, 0.15), rgba(255, 255, 255, 0));
}

.prompt-card:hover {
    transform: translateY(-10px); /* Slight lift on hover */
    box-shadow: 0 20px 30px rgba(0,0,0,0.2); /* Enhanced shadow on hover */
}

/* Prompt Card Header */
.prompt-card .card-header {
    background-color: #f8f9fa; /* Light background */
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
    padding: 20px;
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #e0e0e0, #f8f9fa);
}

/* Prompt Card Body */
.prompt-card .card-body {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.prompt-card .card-body .card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.prompt-card .card-body .card-title:hover {
    text-decoration: underline;
}

.prompt-card .card-body .card-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-card .card-body .badges {
    margin-top: auto;
}

.prompt-card .card-body .badge {
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.prompt-card .card-body .badge.bg-info.text-dark {
    background-color: var(--light-blue);
    color: var(--dark-blue);
}

.prompt-card .card-body .badge.bg-secondary {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.prompt-card .card-body .badge:hover {
    background-color: var(--dark-blue);
    color: #ffffff;
}

/* ============================
   Additional Enhancements
   ============================ */

/* Card Hover Animations */
.card.shadow-lg {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.shadow-lg:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Table Styling */
.table thead th {
    background-color: var(--light-gray);
    color: var(--dark-blue);
    font-weight: 600;
}

.table tbody tr td {
    vertical-align: middle;
}

.table-responsive {
    overflow-x: auto;
}

/* Badge Styling */
.badge {
    margin-right: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.badge.bg-info.text-dark {
    background-color: var(--light-blue);
    color: var(--dark-blue);
}

.badge.bg-secondary {
    background-color: var(--primary-blue);
}

.badge:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
}

/* Button Icons */
.btn i {
    font-size: 1.1rem;
}

/* Card Footer (Optional) */
.card-footer {
    background-color: transparent;
    border-top: none;
}

/* ============================
   Footer Styling
   ============================ */

footer {
    background-color: #343a40; /* Dark background */
    color: #ffffff;
    width: 100%;
    padding: 10px;
    text-align: center; /* Center the footer text */
    margin-top: auto !important; /* Push footer to the bottom */
}

footer p {
    margin: 0;
}

/* Ensure main takes available space */
main {
    flex: 1; /* Allow main to grow and take up available space */
    width: 100%; /* Ensure main spans the full width */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* ============================
   Footer Link Styling
   ============================ */

/* Style for the footer link */
.footer-link {
    color: var(--light-blue); /* Set the link color to a light blue */
    font-weight: 600; /* Make the text slightly bold */
    text-decoration: none; /* Remove the default underline */
    position: relative; /* For pseudo-element positioning */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transitions */
}

/* Hover and Focus Effects */
.footer-link:hover,
.footer-link:focus {
    color: var(--button-hover); /* Change color on hover/focus */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Underline on Hover using a pseudo-element */
.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--light-blue);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.footer-link:hover::after,
.footer-link:focus::after {
    width: 100%; /* Expand the underline on hover/focus */
    background: var(--button-hover); /* Change underline color on hover/focus */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .footer-link {
        font-size: 1rem; /* Ensure readability on smaller screens */
    }
}

/* ============================
   Additional Enhancements
   ============================ */

/* Adjust Delete Button to remove extra background causing larger size */
.btn-delete {
    padding: 0.25rem 0.5rem; /* Reduced padding to minimize size */
    background-color: var(--danger-red); /* Maintain red background */
    box-shadow: none; /* Remove any box-shadow if present */
    /* Ensure the button size fits the content */
    width: auto;
    height: auto;
}

/* Remove padding from inline forms to prevent Delete button background area from expanding */
form.d-inline {
    padding: 0 !important;
}

/* public/css/styles.css */

/* ============================
   Copy Prompt Button Styling
   ============================ */

/* Copy Prompt Button Styling */
.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    border-radius: 50%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.copy-btn i {
    font-size: 1.8rem;
    color: var(--primary-blue);
}

@media (max-width: 768px) {
    .copy-btn {
        top: 10px;
        right: 10px;
        padding: 8px;
    }

    .copy-btn i {
        font-size: 1.2rem;
    }
}

/* ============================
   Prompt Content Styling
   ============================ */

/* Styling for the prompt content */
.prompt-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    white-space: pre-wrap; /* Allow text to wrap */
    word-wrap: break-word;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ensure the prompt content doesn't overlap with the copy button */
.prompt-content {
    padding-top: 50px; /* Space for the copy button */
}

/* ============================
   Toast Styling (Optional Enhancement)
   ============================ */

/* Customize the appearance of Bootstrap Toasts */
.toast-container .toast {
    min-width: 250px;
    max-width: 350px;
    border-radius: 8px;
}

.toast-body {
    font-size: 0.95rem;
}

/* ============================
   Additional Enhancements
   ============================ */

/* Ensure the entire card is visually appealing */
.prompt-card {
    position: relative;
    overflow: hidden;
}

/* Ensure no unwanted scrolling within the prompt content */
.prompt-content {
    overflow: auto;
}

/* ============================
   Shareable Link
   ============================ */

/* Shareable Link Section Styling */
.shareable-link-section .input-group {
    max-width: 500px;
    margin: 0 auto;
}

.shareable-link-section .alert {
    text-align: center;
}

.shareable-link-section .btn {
    white-space: nowrap;
    margin-bottom: 5px;
}

.shareable-link-section .btn i {
    margin-right: 5px;
}

.shareable-link-section .d-flex.flex-wrap {
    justify-content: center;
}

.shareable-link-section #qrCodeCanvas {
    margin: 0 auto;
}

/* ============================
   Buttons Adjustments
   ============================ */

/* Adjustments for Delete Buttons */
.btn-delete {
    padding: 0.25rem 0.5rem;
    background-color: var(--danger-red);
    box-shadow: none;
    width: auto;
    height: auto;
}

/* Remove padding from inline forms */
form.d-inline {
    padding: 0 !important;
}

/* ============================
   Copy Button
   ============================ */

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
}

@media (max-width: 768px) {
    .copy-btn {
        top: 10px;
        right: 10px;
    }
}

/* ============================
   Main Content
   ============================ */

/* Ensure main takes available space */
main {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* ============================
   Footer Link Styling
   ============================ */

.footer-link {
    color: var(--light-blue);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--button-hover);
    transform: translateY(-2px);
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--light-blue);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.footer-link:hover::after,
.footer-link:focus::after {
    width: 100%;
    background: var(--button-hover);
}

/* ============================
   QR Code Container
   ============================ */

#qrCodeContainer {
    display: inline-block;
    margin: 0 auto;
}

/* ============================
   Responsive Adjustments
   ============================ */

@media (max-width: 768px) {
    .footer-link {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .shareable-link-section .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}
