/* Admin Panel Styles */
:root {
    --admin-bg: #1a1a1a;
    --admin-sidebar: #111;
    --admin-header: #222;
    --admin-text: #eee;
    --admin-accent: #f8D200;
    --admin-border: #333;
}

body.admin-body {
    background-color: var(--admin-bg);
    color: var(--admin-text);
    display: flex;
    min-height: 100vh;
}

/* Login Page */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--admin-bg);
}

.login-box {
    width: 400px;
    padding: 40px;
    background-color: var(--admin-header);
    border: 1px solid var(--admin-border);
    border-radius: 4px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--admin-accent);
}

/* Dashboard Layout */
.admin-sidebar {
    width: 250px;
    background-color: var(--admin-sidebar);
    border-right: 1px solid var(--admin-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed; /* Fixed position */
    top: 0;
    left: 0;
    height: 100vh; /* Full viewport height */
    overflow-y: auto; /* Scrollable if content is too long */
    z-index: 1000;
}

.admin-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #fff;
    text-align: center;
}

.admin-nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-nav a {
    display: block;
    padding: 12px 16px;
    border-radius: 4px;
    color: #aaa;
    transition: all 0.3s ease;
}

.admin-nav a:hover, .admin-nav a.active {
    background-color: var(--admin-bg);
    color: var(--admin-accent);
}

.admin-main {
    flex: 1;
    padding: 40px;
    margin-left: 250px; /* Offset for fixed sidebar */
    /* overflow-y: auto; Removed as body handles scrolling now */
    width: calc(100% - 250px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--admin-border);
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--admin-header);
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
    color: var(--admin-accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background-color: rgba(255,255,255,0.02);
}

/* Dynamic Button Base Styles */
.btn, .action-btn, .btn-primary, .btn-secondary, .btn-accent, .btn-edit, .btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px; /* Slightly larger padding */
    border: none;
    border-radius: 50px; /* Pill shape for modern look */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Deeper shadow */
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* Hover Effects */
.btn:hover, .action-btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-accent:hover, .btn-edit:hover, .btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

/* Active Effects */
.btn:active, .action-btn:active, .btn-primary:active, .btn-secondary:active, .btn-accent:active, .btn-edit:active, .btn-delete:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Table Action Buttons override */
.action-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-right: 8px;
    border-radius: 6px; /* Keep small radius for table buttons */
}

.btn-edit {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
}

/* Button Sizes */
.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 5px;
    padding: 10px 0;
}

.file-name-text {
    color: #aaa;
    margin-left: 10px;
    font-size: 0.9rem;
}

.mt-2 {
    margin-top: 8px;
}

/* Admin Card */
.admin-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Form Elements */
.text-danger {
    color: #ff4444;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #888;
}

.image-preview-box {
    width: 150px;
    height: 150px;
    border: 2px dashed #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1a1a1a;
    margin-top: 10px;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-text {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
}
.btn-text:hover {
    color: #fff;
    text-decoration: underline;
}

/* Form Layouts */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.col-half {
    flex: 1;
}

/* Forms */
.admin-form-group,
.form-group {
    margin-bottom: 20px;
}

.admin-form-group label,
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-weight: 500;
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select,
.form-control {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus,
.form-control:focus {
    border-color: var(--admin-accent);
    outline: none;
    background-color: #333;
}

.admin-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #444;
}

.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
    color: #F44336;
}

/* Toggle Switch Styles */
.toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
}

.toggle-input {
    display: none;
}

.toggle-bar {
    display: block;
    width: 60px;
    height: 30px;
    background-color: #333;
    border-radius: 15px;
    position: relative;
    transition: background-color 0.3s ease;
    border: 1px solid #555;
}

.toggle-knob {
    display: block;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-input:checked + .toggle-bar {
    background-color: var(--admin-accent);
    border-color: var(--admin-accent);
}

.toggle-input:checked + .toggle-bar .toggle-knob {
    transform: translateX(30px);
    background-color: #000;
}

.toggle-label-text {
    color: #eee;
    font-size: 1rem;
    font-weight: 500;
}

/* Collapsible Sections */
.section-block {
    background: #222;
    border: 1px solid #333;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.section-header {
    padding: 15px 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.section-header:hover {
    background: #333;
}

.section-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--admin-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.section-toggle-icon {
    font-size: 1.2rem;
    color: #888;
    transition: transform 0.3s ease;
}

.section-block.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 20px;
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-block.collapsed .section-content {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Top Actions Bar */
.settings-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #111;
    padding: 15px;
    border: 1px solid #333;
    border-radius: 4px;
    position: sticky;
    top: 20px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.btn-primary, .btn-accent {
    background-color: var(--admin-accent);
    color: #000;
    text-transform: uppercase;
    font-weight: 700;
}

.btn-secondary {
    background-color: #444;
    color: #fff;
    margin-right: 10px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}
.custom-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ccc;
}
.custom-radio input {
    display: none;
}
.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-radio input:checked + .radio-mark {
    border-color: #2196F3; /* Blue outline */
}
.custom-radio input:checked + .radio-mark::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #2196F3; /* Blue dot */
    border-radius: 50%;
}

/* Image Manager Styles */
.image-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.image-card {
    background: #000;
    border: 1px solid #444;
    position: relative;
    aspect-ratio: 16/9;
}
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
}
.btn-delete-img {
    background: rgba(255, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.upload-area {
    border: 2px dashed #444;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    margin-bottom: 15px;
}
.upload-area:hover {
    border-color: var(--admin-accent);
}
