/* General Body Styling */
body {
    background-color: #f0f2f5; /* Light gray background */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 70px; /* Adjust for fixed navbar */
    padding-bottom: 60px; /* Adjust for fixed footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Content Area */
.main-content {
    flex: 1; /* Allows main content to grow and push footer down */
}

/* Navbar Styling */
.navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0d6efd !important; /* Bootstrap primary blue */
}

.profile-avatar-nav {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border: 2px solid #0d6efd; /* Primary color border */
}

/* Hero Section Styling (index.php) */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/S00012.JPG') no-repeat center center;
    background-size: cover;
    padding: 100px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.hero-content .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-content .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.hero-content .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-3px);
}

.hero-content .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.hero-content .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    transform: translateY(-3px);
}

/* Card Styling (General) */
.card {
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: none;
}

.card-title {
    color: #333;
    font-weight: 600;
}

/* Post Form Card */
.post-form-card {
    background-color: #ffffff;
}

.post-form-card textarea {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    resize: vertical;
}

.post-form-card .btn {
    border-radius: 20px;
    padding: 8px 20px;
}

/* Individual Post Card */
.post-card {
    background-color: #ffffff;
    transition: transform 0.2s ease-in-out;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card .card-body {
    padding-bottom: 10px;
}

.post-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.post-card .card-subtitle {
    color: #333;
}

.post-card .text-muted {
    font-size: 0.85rem;
}

.post-image, .post-video {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    background-color: #000; /* Black background for media */
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.admin-post {
    border: 2px solid #dc3545; /* Red border for admin posts */
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.admin-badge {
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* Like Button */
.like-btn {
    border-radius: 20px;
    font-weight: 600;
    padding: 5px 15px;
}

.like-btn .bi {
    margin-right: 5px;
}

.like-count {
    font-weight: 500;
    color: #6c757d !important;
}

/* Comments Section */
.comment {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.comment .fw-bold {
    color: #333;
}

.comment .text-muted {
    font-size: 0.75rem;
}

.comment p {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.comment .rounded-circle {
    width: 25px;
    height: 25px;
    object-fit: cover;
}

.input-group .form-control-sm {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.input-group .btn-sm {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* Footer Styling */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

/* Wrapper for Login/Register Forms */
.wrapper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 130px); /* Adjust for fixed header and footer */
    padding: 20px 0;
}

.wrapper {
    width: 100%;
    max-width: 400px; /* Max width for the form */
    padding: 30px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.wrapper h2 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.wrapper p {
    margin-bottom: 25px;
    color: #666;
}

.wrapper .form-label {
    text-align: left;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.wrapper .form-control {
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
}

.wrapper .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.wrapper .btn-primary {
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1.1rem;
    margin-top: 15px;
}

.wrapper .invalid-feedback {
    text-align: left;
}

.wrapper a {
    color: #0d6efd;
    text-decoration: none;
}

.wrapper a:hover {
    text-decoration: underline;
}

/* Utility classes for spacing and alignment (from Bootstrap, ensuring they are present) */
.mt-4 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }
.d-flex { display: flex !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.text-white { color: #fff !important; }
.fw-bold { font-weight: 700 !important; }
.lead { font-size: 1.25rem !important; }
.display-3 { font-size: calc(1.525rem + 3.3vw) !important; }
.btn { display: inline-block; font-weight: 400; line-height: 1.5; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.btn-primary { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-lg { padding: 0.5rem 1rem; font-size: 1.25rem; border-radius: 0.3rem; }
.mx-2 { margin-right: 0.5rem !important; margin-left: 0.5rem !important; }
.bg-dark { background-color: #212529 !important; }
.bg-opacity-75 { --bs-bg-opacity: 0.75; }
.fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
.fixed-bottom { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1030; }
.rounded-circle { border-radius: 50% !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.start-100 { left: 100% !important; }
.translate-middle { transform: translate(-50%, -50%) !important; }
.badge { display: inline-block; padding: 0.35em 0.65em; font-size: 0.75em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.25rem; }
.rounded-pill { border-radius: 50rem !important; }
.bg-danger { background-color: #dc3545 !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.mt-auto { margin-top: auto !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.col-lg-8 { flex: 0 0 auto; width: 66.66666667%; }
.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.form-control { display: block; width: 100%; padding: 0.375rem 0.75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; background-color: #fff; background-clip: padding-box; border: 1px solid #ced4da; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0.25rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } 
.form-control-sm { min-height: calc(1.5em + 0.5rem + 2px); padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.2rem; } 
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; } 
.btn-outline-primary:hover { color: #fff; background-color: #0d6efd; border-color: #0d6efd; } 
.img-fluid { max-width: 100%; height: auto; } 
.ratio { position: relative; width: 100%; } 
.ratio::before { content: ""; display: block; padding-top: var(--bs-aspect-ratio); } 
.ratio > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 
.ratio-16x9 { --bs-aspect-ratio: 56.25%; }

/* Ensure Bootstrap's responsive navbar behavior */
.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

@media (min-width: 992px) { /* Equivalent to Bootstrap's -lg breakpoint */
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
}

/* Profile Page Styling */
.profile-container {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.profile-card {
    padding: 20px;
}

.profile-picture-container {
    width: 150px; /* Fixed width */
    height: 150px; /* Fixed height */
    border-radius: 50%; /* Make it circular */
    overflow: hidden; /* Hide parts of the image outside the circle */
    border: 3px solid #566ef7; /* Primary color border */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
}

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the circular area */
    display: block; /* Remove extra space below image */
}

.edit-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: rgb(235, 9, 9);
    border-radius: 50%;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.profile-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.character-info-container {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    background-color: #d6d7da;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.character-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Default to 1 column on small screens */
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) { /* Medium devices (tablets, 768px and up) */
    .character-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) { /* Large devices (desktops, 992px and up) */
    .character-cards-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

.character-candle-card {
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.character-candle-card .card-header {
    background-color: #0d6efd;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 10px 15px;
    font-weight: 600;
}

.character-candle-card .card-body p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.character-candle-card .card-body strong {
    color: #333;
}

/* Custom styles for notification badges in the navbar */
.nav-badge {
    /* Adjust position */
    top: 20%;
    
    /* Adjust size */
    font-size: 0.6em;
    padding: 0.3em 0.5em;
}

/*--[ Modern Character Sheet ]--*/
.character-sheets-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.character-sheet {
    background: #e7e5e5;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.character-sheet:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.character-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #343a40;
}

.character-level {
    background-color: #0d6efd;
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
}

.character-level .bi {
    margin-right: 5px;
    vertical-align: -1px;
}

.sheet-body {
    padding: 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Use two columns on wider screens */
@media (min-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item .bi {
    font-size: 1.1rem;
    margin-right: 15px;
    color: #0d6efd; /* Use primary color for icons */
    width: 20px;
    text-align: center;
}

.stat-item strong {
    color: #6c757d; /* Muted color for stat name */
    font-weight: 500;
    flex-grow: 1;
}

.stat-item span {
    color: #212529;
    font-weight: 600;
    font-size: 1rem;
}
/*--[ End Modern Character Sheet ]--*/