/* Import Roboto font for modern typography */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: #6a0dad;
    --primary-hover: #8a2be2;
    --dark-bg: #2c2c2c;
    --darker-bg: #1a1a1a;
    --text-color: #ffffff;
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

/* Profile container */
.profile-container {
    max-width: 98vw; /* Nearly full width with slight margins */
    margin: 20px 1vw; /* Minimal side margins */
    background: linear-gradient(135deg, #0000ff, #800080, #ffffff);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    animation: spin-colors 10s linear infinite;
}

@keyframes spin-colors {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

/* Header */
.profile-header {
    background: var(--dark-bg);
    padding: 40px; /* More prominent header */
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Hamburger menu */
.profile-hamburger {
    display: none;
    font-size: 1.75rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 40px; /* More space from edge */
    transform: translateY(-50%);
    color: var(--text-color);
}

/* Sidebar */
.profile-sidebar {
    width: 320px; /* Wider sidebar */
    background: var(--darker-bg);
    padding: 40px; /* More internal space */
    color: var(--text-color);
    min-height: 100%;
}

.profile-sidebar ul {
    list-style: none;
}

.profile-sidebar ul li {
    padding: 15px;
    cursor: pointer;
    margin-bottom: 15px; /* More spacing */
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
}

.profile-sidebar ul li:hover,
.profile-sidebar ul li.profile-active {
    background: var(--primary-color);
}

/* Profile body */
.profile-body {
    display: grid;
    grid-template-columns: 320px 1fr; /* Wider sidebar ratio */
    min-height: 700px;
}

/* Content area */
.profile-content {
    padding: 50px; /* More padding for content */
    background: var(--dark-bg);
    background-image: url('https://buy8hrs.com/wp-content/uploads/2024/11/iStock-1357005228-scaled.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 var(--border-radius) 0;
}

/* Tab content */
.profile-tab-content {
    display: none;
}

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

/* Overview container */
.profile-overview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px; /* Larger gap for separation */
    margin-top: 40px; /* More space above */
}

/* Profile boxes */
.profile-box {
    background: var(--darker-bg);
    border-radius: var(--border-radius);
    padding: 40px; /* More internal space */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hours container */
.profile-hours-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px; /* Larger gap */
}

.profile-hours-box p,
.profile-pending-hours-box p {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 20px 0; /* More vertical space */
}

.profile-heading-with-info {
    display: flex;
    align-items: center;
    gap: 20px; /* Larger gap */
}

/* Buttons */
.profile-buy-hours-btn,
.profile-sell-hours-btn,
.profile-schedule-service-btn,
.profile-cancel-booking-btn,
.profile-view-booking-btn,
.profile-save-changes-btn {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    margin: 10px 0; /* Vertical spacing */
}

.profile-buy-hours-btn {
    margin-bottom: 15px; /* Extra space when stacked */
}

.profile-buy-hours-btn:hover,
.profile-sell-hours-btn:hover,
.profile-schedule-service-btn:hover,
.profile-cancel-booking-btn:hover,
.profile-view-booking-btn:hover,
.profile-save-changes-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.profile-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; /* Larger gap */
    margin-top: 40px; /* More space above */
}

/* Info button */
.profile-info-btn {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.profile-info-btn:hover {
    background: var(--primary-hover);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0; /* More vertical spacing */
}

th, td {
    padding: 15px;
    border-bottom: 1px solid #444;
    text-align: left;
}

th {
    background: var(--dark-bg);
    font-weight: 700;
}

td {
    background: var(--darker-bg);
}

tr:nth-child(even) td {
    background: #252525;
}

tr:hover td {
    background: #333;
}

/* Form styling */
.profile-account-update-form label {
    display: block;
    margin: 20px 0 10px; /* More spacing */
    font-weight: 500;
}

.profile-account-update-form input[type="text"],
.profile-account-update-form input[type="password"],
.profile-account-update-form input[type="email"],
.profile-account-update-form select {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px; /* More spacing */
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: var(--text-color);
    font-size: 1.1rem;
}

.profile-account-update-form select {
    appearance: none;
    background: #333 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path fill="%23fff" d="M0 0h12l-6 6z"/></svg>') no-repeat right 15px center;
}

/* Update messages */
.profile-update-message {
    padding: 20px;
    margin-bottom: 40px; /* More spacing */
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
}

.profile-update-message.profile-success {
    background: linear-gradient(135deg, #cc00ff, #0000ff, #39ff14);
}

.profile-update-message.profile-error {
    background: #dc3545;
}

/* Modals */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.profile-modal-content {
    background: var(--darker-bg);
    padding: 40px; /* More internal space */
    border-radius: var(--border-radius);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.profile-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.profile-modal-close:hover {
    background: var(--primary-hover);
}

.profile-booking-details p {
    margin: 15px 0;
    font-size: 1.1rem;
}

/* Overlay */
.profile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
}

.profile-overlay.profile-active {
    display: block;
}

/* Medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
    .profile-container {
        max-width: 98vw;
        margin: 15px 1vw;
    }
    .profile-body {
        grid-template-columns: 250px 1fr; /* Slightly narrower sidebar */
    }
    .profile-sidebar {
        width: 250px;
        padding: 30px;
    }
    .profile-overview-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .profile-overview-right {
        margin-top: 40px;
    }
    .profile-hours-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .profile-content {
        padding: 40px;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .profile-container {
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
    }
    .profile-body {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: fixed;
        top: 0;
        left: -75%;
        width: 75%; /* Wider sidebar on mobile */
        height: 100%;
        padding: 25px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    .profile-sidebar.profile-active {
        left: 0;
    }
    .profile-hamburger {
        display: block;
    }
    .profile-content {
        padding: 30px;
        border-radius: 0;
    }
    .profile-overview-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .profile-hours-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .profile-header {
        padding: 25px;
        font-size: 1.5rem;
    }
}

/* Notifications section */
.profile-notifications-box {
    margin-top: 50px; /* Lower the notifications section */
}