/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header & Navigation */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e2e8f0;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-nav a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: #4299e1;
}
.main-nav a.nav-btn {
    background-color: #4299e1;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s;
}
.main-nav a.nav-btn:hover {
    background-color: #3182ce;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 40px 0;
}

/* Footer */
.main-footer {
    background-color: #2d3748;
    color: #a0aec0;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Form Styling (Refined) */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.profile-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.profile-form legend {
    font-size: 1.5em;
    font-weight: 600;
    color: #2d3748;
    padding: 0;
    margin-bottom: 20px;
    text-align: center;
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; color: #4a5568; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
    outline: none;
}

/* Buttons */
.submit-btn {
    display: block; width: 100%; padding: 15px; background-color: #4299e1;
    color: white; border: none; border-radius: 8px; font-size: 1.1em;
    font-weight: 600; cursor: pointer; transition: background-color 0.2s;
}
.submit-btn:hover { background-color: #3182ce; }

/* Dashboard Styling */
.dashboard-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.dashboard-header h1 { color: #2d3748; }
.dashboard-header p { color: #718096; }

/* Error/Success Messages */
.error-message { color: #e53e3e; background-color: #fed7d7; border: 1px solid #f56565; padding: 10px; border-radius: 6px; margin-bottom: 15px; }
.success-message { color: #38a169; background-color: #c6f6d5; border: 1px solid #68d391; padding: 10px; border-radius: 6px; margin-bottom: 15px; }

/* Admin Dashboard Table Styling */
.admin-table-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow-x: auto; /* For responsive behavior on small screens */
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
    text-transform: uppercase;
}
td {
    color: #2d3748;
}
tbody tr:last-child td {
    border-bottom: none;
}
tbody tr:hover {
    background-color: #f7fafc;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-approved { background-color: #c6f6d5; color: #2f855a; }
.status-pending { background-color: #feebc8; color: #975a16; }
.status-rejected { background-color: #fed7d7; color: #9b2c2c; }

/* Action Buttons */
.actions .action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-right: 5px;
}
.actions .action-btn:hover {
    opacity: 0.8;
}
.action-btn.approve { background-color: #38a169; }
.action-btn.reject { background-color: #d69e2e; }
.action-btn.delete { background-color: #e53e3e; }

/* Button in Dashboard Header */
.header-action-btn {
    display: inline-block;
    background-color: #38a169; /* Green color */
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.2s;
}
.header-action-btn:hover {
    background-color: #2f855a;
    color: white;
}

/* Custom Styling for Dropdown (Select) Menus */
.form-group select {
    /* Reset browser default styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Apply same styles as other inputs */
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    background-color: #fff;

    /* Add a custom arrow using an SVG background image */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Make space for the arrow */
}

.form-group select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
    outline: none;
}

/* Styling for links inside table actions */
.actions a.action-btn {
    display: inline-block;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background-color: #718096; /* Neutral grey */
    margin-right: 5px;
    font-size: 0.9em;
}

.actions a.action-btn:hover {
    opacity: 0.8;
}

.actions a.reject {
    background-color: #d69e2e; /* Orange/yellow for edit */
}

/* Small helper text in forms */
.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #718096;
}

/* Styling for Dynamic Form Sections */
.dynamic-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.dynamic-entry {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background: #f7fafc;
    padding: 10px;
    border-radius: 6px;
}
.dynamic-entry input, .dynamic-entry select {
    flex-grow: 1;
}
.add-btn {
    background-color: #718096;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}
.add-btn:hover { background-color: #4a5568; }
hr { border: 0; border-top: 1px solid #e2e8f0; margin: 20px 0; }

/* Bootstrap Overrides and Tweaks */

/* Make our custom header compatible with Bootstrap's container */
.main-header .container {
    max-width: 1140px; /* Match bootstrap's .container */
}

/* Ensure body has a bit of padding below the fixed header */
body {
    padding-top: 70px; /* Adjust if your header height changes */
}

.main-header {
    position: fixed; /* Make header sticky */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

.main-content {
    padding-top: 2rem;
}


/* Style the new dynamic entry for Bootstrap */
.dynamic-entry.input-group .form-control {
    min-width: 100px; /* Prevent inputs from becoming too small */
}

/* Make card headers look a bit cleaner */
.card-header {
    font-weight: 600;
    background-color: #f7f9fc;
}

/* --- Index Page Gallery Card Styling --- */
.artist-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
}
.artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}
.card-img-top-container {
    position: relative;
}
.artist-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.artist-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    bottom: -50px; /* Halfway down */
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.artist-card .card-body {
    padding-top: 60px; /* Space for the avatar */
}

/* --- Artist Profile Detail Page Styling --- */
.profile-header {
    position: relative;
    height: 40vh;
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}
.profile-header-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
}
.profile-page-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.profile-name {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.artwork-item img {
    margin-bottom: 0.5rem;
}
.artwork-item .artwork-caption {
    font-size: 0.9rem;
}

/* --- Slider Styling --- */
.carousel-item {
    height: 60vh; /* Adjust height of the slider */
    min-height: 500px;
}
.slider-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    -webkit-filter: brightness(0.6); /* Darken image for text readability */
    filter: brightness(0.6);
}
.carousel-caption {
    bottom: 3rem;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* --- Stats Bar Styling --- */
.stats-bar {
    background-color: #f8f9fa; /* A light grey background */
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

/* Minor tweak to Bootstrap pagination */
.pagination .page-link {
    color: #4299e1;
}
.pagination .page-item.active .page-link {
    background-color: #4299e1;
    border-color: #4299e1;
}

/* --- Floating Bubbles Animation --- */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind the flipbook */
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -150px; /* Start below the screen */
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh); /* Move high above the screen */
        opacity: 0;
    }
}

/* Create variations for a random effect */
.bubble:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-duration: 15s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 30px; height: 30px; left: 20%; animation-duration: 12s; animation-delay: 1.5s; }
.bubble:nth-child(3) { width: 50px; height: 50px; left: 35%; animation-duration: 18s; animation-delay: 3s; }
.bubble:nth-child(4) { width: 90px; height: 90px; left: 50%; animation-duration: 10s; animation-delay: 0.5s; }
.bubble:nth-child(5) { width: 35px; height: 35px; left: 65%; animation-duration: 16s; animation-delay: 5s; }
.bubble:nth-child(6) { width: 45px; height: 45px; left: 80%; animation-duration: 11s; animation-delay: 2.5s; }
.bubble:nth-child(7) { width: 65px; height: 65px; left: 90%; animation-duration: 20s; animation-delay: 4s; }
.bubble:nth-child(8) { width: 25px; height: 25px; left: 55%; animation-duration: 14s; animation-delay: 6s; }
.bubble:nth-child(9) { width: 55px; height: 55px; left: 25%; animation-duration: 17s; animation-delay: 1s; }
.bubble:nth-child(10) { width: 70px; height: 70px; left: 5%; animation-duration: 13s; animation-delay: 4.5s; }

/* ========================================================================= */
/* 5. ANIMATED BUTTONS                                                      */
/* ========================================================================= */

/* --- Animated "View Profile" Button (.btn-primary) --- */
.btn-primary {
    /* Create a gradient background and make it larger than the button */
    background-image: linear-gradient(to right, #4f46e5 0%, #3b82f6 50%, #4f46e5 100%);
    background-size: 200% auto;

    /* Set up transitions for a smooth effect */
    transition: background-position 0.4s ease-in-out, transform 0.2s ease;
    border: none;
}

.btn-primary:hover {
    /* On hover, slide the background gradient to the right */
    background-position: right center;

    /* Make the button slightly larger */
    transform: scale(1.05);
}

.btn-primary:active {
    /* Add a "press down" effect when clicked */
    transform: scale(0.98);
}


/* --- Animated "Load More" Button (#load-more-btn) --- */
#load-more-btn {
    /* Apply the floating animation */
    animation: float 2s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

#load-more-btn:active {
    /* Remove the float animation and apply a press effect when clicked */
    animation: none;
    transform: scale(0.98);
}

/* Keyframes for the floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}