/**
 * AIM-Robotics Admin Panel & Live Editor Styles
 * Huisstijl: #0B1993 (primary), #428FE7 (accent)
 */

:root {
    --admin-primary: #0B1993;
    --admin-accent: #428FE7;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-error: #ef4444;
    --admin-bg-dark: rgba(11, 25, 147, 0.95);
    --admin-bg-light: rgba(66, 143, 231, 0.1);
}

/* ============================================
   ADMIN TOGGLE BUTTON
   ============================================ */
.admin-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B1993 0%, #0a1680 100%);
    border: 2px solid rgba(66, 143, 231, 0.5);
    color: white;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(11, 25, 147, 0.4);
}

.admin-toggle svg {
    width: 22px;
    height: 22px;
    transition: transform 0.5s ease;
}

.admin-toggle:hover {
    background: linear-gradient(135deg, #428FE7 0%, #0B1993 100%);
    color: white;
    border-color: #428FE7;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(66, 143, 231, 0.5);
}

.admin-toggle:hover svg {
    transform: rotate(90deg);
}

.admin-toggle.active {
    background: linear-gradient(135deg, #428FE7 0%, #0B1993 100%);
    color: white;
    border-color: #428FE7;
    box-shadow: 0 6px 25px rgba(66, 143, 231, 0.5);
}

.admin-toggle.active svg {
    transform: rotate(180deg);
}

/* ============================================
   ADMIN LOGIN MODAL
   ============================================ */
.admin-login-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-login-modal.active {
    opacity: 1;
    visibility: visible;
}

.admin-login-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 102, 255, 0.1);
}

.admin-login-modal.active .admin-login-content {
    transform: scale(1) translateY(0);
}

.admin-login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-login-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.admin-login-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.admin-login-close:hover {
    color: #ff6b00;
}

.admin-login-body {
    padding: 25px;
}

.admin-login-body p {
    color: #9ca3af;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.admin-password-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.admin-password-input:focus {
    outline: none;
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
}

.admin-password-input.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.admin-login-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 10px;
    min-height: 20px;
}

.admin-login-footer {
    padding: 0 25px 25px;
}

.admin-login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-login-btn:hover {
    background: linear-gradient(135deg, #0077ed 0%, #0066cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-panel {
    position: fixed;
    top: 80px;
    right: -380px;
    width: 350px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, rgba(11, 25, 147, 0.98), rgba(8, 18, 107, 0.98));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.admin-panel.active {
    right: 30px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.1), transparent);
}

.admin-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.admin-icon {
    font-size: 1.25rem;
}

.admin-panel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #10b981;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.admin-panel-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 300px);
    scrollbar-width: thin;
    scrollbar-color: #428FE7 transparent;
}

.admin-panel-body::-webkit-scrollbar {
    width: 6px;
}

.admin-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.admin-panel-body::-webkit-scrollbar-thumb {
    background: #428FE7;
    border-radius: 3px;
}

.admin-panel-body::-webkit-scrollbar-thumb:hover {
    background: #0B1993;
}

.admin-info {
    text-align: center;
    margin-bottom: 20px;
}

.admin-info p {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.admin-info small {
    color: #6b7280;
    font-size: 0.8rem;
}

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

.stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.3);
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #428FE7;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-panel.has-changes .stat:first-child .stat-value {
    color: #ff6b00;
}

.admin-panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn svg {
    width: 16px;
    height: 16px;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.admin-btn-save {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.admin-btn-save:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.2));
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.2);
}

.admin-btn-reset {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.admin-btn-reset:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.2));
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.2);
}

.admin-btn-export {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2), rgba(0, 102, 204, 0.1));
    border-color: rgba(0, 102, 204, 0.3);
    color: #0066cc;
}

.admin-btn-export:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.3), rgba(0, 102, 204, 0.2));
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.2);
}

.admin-btn-close {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(107, 114, 128, 0.1));
    border-color: rgba(107, 114, 128, 0.3);
    color: #6b7280;
}

.admin-btn-close:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3), rgba(107, 114, 128, 0.2));
}

/* ============================================
   EDIT MODE STYLES
   ============================================ */
.admin-edit-mode .editable {
    position: relative;
    outline: 2px dashed transparent;
    outline-offset: 4px;
    transition: all 0.3s ease;
    cursor: text;
    border-radius: 4px;
}

.admin-edit-mode .editable:hover {
    outline-color: rgba(0, 102, 204, 0.5);
    background: rgba(0, 102, 204, 0.05);
}

.admin-edit-mode .editable.editing {
    outline-color: #0066cc;
    outline-style: solid;
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.2);
}

.admin-edit-mode .editable.unsaved {
    outline-color: #ff6b00 !important;
}

.admin-edit-mode .editable.unsaved::after {
    content: '●';
    position: absolute;
    top: -8px;
    right: -8px;
    color: #ff6b00;
    font-size: 12px;
}

/* Edit mode indicator overlay */
.admin-edit-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #ff6b00, #0066cc);
    background-size: 200% 100%;
    animation: editModeGradient 3s linear infinite;
    z-index: 10000;
}

@keyframes editModeGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ============================================
   INLINE TOOLBAR
   ============================================ */
.inline-toolbar {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    animation: toolbarFadeIn 0.2s ease;
}

@keyframes toolbarFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.inline-toolbar button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-toolbar button:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 102, 204, 0.3);
    color: #0066cc;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.admin-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    z-index: 10003;
    animation: notificationSlideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes notificationSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.admin-notification.fade-out {
    animation: notificationFadeOut 0.3s ease forwards;
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.admin-notification.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(22, 33, 62, 0.98));
}

.admin-notification.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.15), rgba(22, 33, 62, 0.98));
}

.admin-notification.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(22, 33, 62, 0.98));
}

.admin-notification.info {
    border-color: rgba(0, 102, 204, 0.3);
    background: linear-gradient(145deg, rgba(0, 102, 204, 0.15), rgba(22, 33, 62, 0.98));
}

.notification-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .admin-panel {
        width: 100%;
        right: -100%;
        border-radius: 20px 0 0 20px;
    }
    
    .admin-panel.active {
        right: 0;
    }
    
    .admin-toggle {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .admin-notification {
        width: calc(100% - 40px);
        left: 20px;
        transform: none;
    }
    
    .admin-notification.fade-out {
        animation: notificationFadeOutMobile 0.3s ease forwards;
    }
    
    @keyframes notificationFadeOutMobile {
        to {
            opacity: 0;
            transform: translateY(20px);
        }
    }
}

/* ============================================
   IMAGE EDIT MODAL
   ============================================ */
.admin-image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-image-modal.active {
    opacity: 1;
    visibility: visible;
}

.admin-image-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 102, 204, 0.1);
}

.admin-image-modal.active .admin-image-content {
    transform: scale(1) translateY(0);
}

.admin-image-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-image-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.admin-image-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.admin-image-close:hover {
    color: #ff6b00;
}

.admin-image-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-preview-container:hover {
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
}

.image-preview-container.drag-over {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    color: white;
    font-size: 0.9rem;
    padding: 12px 24px;
    background: rgba(0, 102, 204, 0.8);
    border-radius: 8px;
}

.image-options {
    margin-top: 20px;
}

.image-option-group {
    margin-bottom: 15px;
}

.image-option-group label {
    display: block;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.image-option-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.image-option-group input:focus {
    outline: none;
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
}

.image-option-group input::placeholder {
    color: #6b7280;
}

.image-info {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-info span {
    color: #6b7280;
    font-size: 0.85rem;
}

.admin-image-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-image-footer .admin-btn {
    flex: 1;
    justify-content: center;
    padding: 14px;
}

.admin-btn-cancel {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.admin-btn-apply {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-color: #0066cc;
    color: white;
}

.admin-btn-apply:hover {
    background: linear-gradient(135deg, #0077ed 0%, #0066cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

/* ============================================
   EDITABLE IMAGE WRAPPER & OVERLAY
   ============================================ */
.editable-image-wrapper {
    position: relative !important;
    display: block;
}

.editable-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Indicator border when in edit mode */
.admin-edit-mode .editable-image-wrapper {
    outline: 2px dashed rgba(0, 102, 204, 0.5);
    outline-offset: 2px;
}

.admin-edit-mode .editable-image-wrapper:hover {
    outline: 2px solid #0066cc;
}

.image-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: inherit;
    z-index: 100;
}

/* Always show overlay in edit mode on hover */
.admin-edit-mode .editable-image-wrapper:hover .image-edit-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Quick edit badge - always visible in edit mode */
.image-edit-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.image-edit-badge svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: none;
}

.admin-edit-mode .image-edit-badge {
    opacity: 1;
    transform: scale(1);
}

.admin-edit-mode .image-edit-badge:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.6);
}

.image-edit-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.image-edit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.4);
}

.image-edit-btn svg {
    width: 20px;
    height: 20px;
}

.image-edit-actions {
    display: flex;
    gap: 10px;
}

.img-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.img-action-btn svg {
    width: 18px;
    height: 18px;
}

.img-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.img-action-btn.img-replace:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
}

.img-action-btn.img-url:hover {
    background: rgba(0, 102, 204, 0.3);
    border-color: #0066cc;
}

.img-action-btn.img-reset:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

/* Unsaved image indicator */
.editable-image-wrapper.unsaved::after {
    content: '●';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ff6b00;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
    z-index: 5;
}

/* Image outline in edit mode */
.admin-edit-mode .editable-image-wrapper {
    outline: 2px dashed transparent;
    outline-offset: 4px;
    transition: outline-color 0.3s ease;
}

.admin-edit-mode .editable-image-wrapper:hover {
    outline-color: rgba(0, 102, 204, 0.5);
}

.admin-edit-mode .editable-image-wrapper.unsaved {
    outline-color: #ff6b00;
}

/* ============================================
   RESPONSIVE IMAGE MODAL
   ============================================ */
@media (max-width: 768px) {
    .admin-image-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .image-preview-container {
        height: 200px;
    }
    
    .admin-image-footer {
        flex-direction: column;
    }
    
    .image-edit-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .img-action-btn {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   IMAGE TABS & ADJUSTMENTS
   ============================================ */
.image-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0 15px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.image-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.image-tab.active {
    color: white;
    background: rgba(0, 102, 204, 0.3);
}

.image-tab-content {
    display: none;
}

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

.image-slider-group {
    margin-bottom: 15px;
}

.image-slider-group label {
    display: block;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.slider-value {
    color: #0066cc;
    font-weight: 600;
}

.image-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.image-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.4);
    transition: transform 0.2s ease;
}

.image-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.image-slider:disabled {
    opacity: 0.5;
}

.image-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.image-select option {
    background: #1a1a2e;
    color: white;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0066cc;
}

.admin-btn-reset-filters {
    width: 100%;
    margin-top: 15px;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.admin-btn-reset-filters:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ============================================
   ADD ELEMENT SECTION
   ============================================ */
.admin-add-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-add-section h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.add-element-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.add-element-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-element-btn svg {
    width: 20px;
    height: 20px;
}

.add-element-btn:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 102, 204, 0.4);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   ADD BLOCK BUTTONS (Custom Blocks)
   ============================================ */
.admin-blocks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.add-block-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.add-block-btn svg {
    width: 22px;
    height: 22px;
    color: #a78bfa;
}

.add-block-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
    border-color: rgba(139, 92, 246, 0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.add-block-btn:hover svg {
    color: #c4b5fd;
}

/* ============================================
   OPTIMIZATION MODULE
   ============================================ */
.admin-optimization-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.optimization-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.optimization-btn svg {
    width: 20px;
    height: 20px;
    color: #10b981;
}

.optimization-btn span {
    font-weight: 600;
    color: #e5e7eb;
}

.optimization-btn small {
    font-size: 0.6rem;
    color: #6b7280;
}

.optimization-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
    border-color: rgba(16, 185, 129, 0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.optimization-btn:hover svg {
    color: #34d399;
}

/* ============================================
   OPTIMIZATION MODALS
   ============================================ */
.opt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.opt-modal.active {
    opacity: 1;
    visibility: visible;
}

.opt-modal-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(16, 185, 129, 0.1);
}

.opt-modal.active .opt-modal-content {
    transform: scale(1) translateY(0);
}

.opt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.opt-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.opt-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.opt-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.opt-modal-intro {
    margin-bottom: 20px;
}

.opt-modal-intro p {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.opt-form-group {
    margin-bottom: 20px;
}

.opt-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.opt-input, .opt-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.opt-input:focus, .opt-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.opt-input::placeholder {
    color: #6b7280;
}

.opt-form-group small {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6b7280;
}

.opt-form-group small a {
    color: #10b981;
    text-decoration: none;
}

.opt-form-group small a:hover {
    text-decoration: underline;
}

.opt-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opt-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    color: #d1d5db;
    cursor: pointer;
}

.opt-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

.opt-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.opt-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: #d1d5db;
    cursor: pointer;
}

.opt-radio-group input[type="radio"] {
    accent-color: #10b981;
}

.opt-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.opt-tab {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opt-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.opt-tab.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}

.opt-tab-content {
    display: none;
}

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

.opt-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.opt-feature {
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #10b981;
}

.opt-info-box {
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    font-size: 0.85rem;
    color: #93c5fd;
    margin: 20px 0;
}

.opt-info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.opt-info-box strong {
    color: white;
}

.opt-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.opt-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.opt-code-preview {
    margin-top: 20px;
}

.opt-code-preview label {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 8px;
    display: block;
}

.opt-code-preview pre {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 16px;
    overflow-x: auto;
    margin: 0;
}

.opt-code-preview code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #a5f3fc;
    line-height: 1.6;
}

.opt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.opt-modal-cancel,
.opt-modal-close-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opt-modal-cancel:hover,
.opt-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.opt-modal-apply,
.opt-modal-copy {
    padding: 10px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.opt-modal-apply:hover,
.opt-modal-copy:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Performance Check */
.opt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.opt-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: opt-spin 1s linear infinite;
}

@keyframes opt-spin {
    to { transform: rotate(360deg); }
}

.opt-loading p {
    color: #9ca3af;
    font-size: 0.9rem;
}

.opt-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.opt-score {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.opt-score.good {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.opt-score.medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.opt-score.poor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.opt-score-container span {
    color: #9ca3af;
    font-size: 0.85rem;
}

.opt-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.opt-metric {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.opt-metric-label {
    color: #9ca3af;
    font-size: 0.85rem;
}

.opt-metric-value {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.opt-recommendations {
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
}

.opt-recommendations h4 {
    color: white;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.opt-recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.opt-recommendations li {
    padding: 8px 0;
    font-size: 0.85rem;
    color: #93c5fd;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.opt-recommendations li:last-child {
    border-bottom: none;
}

.opt-success {
    color: #10b981;
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
}

/* Code Copy Modal */
.code-modal .opt-modal-content {
    max-width: 700px;
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #a5f3fc;
    line-height: 1.7;
    white-space: pre;
}

/* ============================================
   ADD ELEMENT MODAL
   ============================================ */
.add-element-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10006;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.add-element-modal.active {
    opacity: 1;
    visibility: visible;
}

.add-element-content {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.add-element-modal.active .add-element-content {
    transform: scale(1) translateY(0);
}

.add-element-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.add-element-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.add-element-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.add-element-close:hover {
    color: #ff6b00;
}

.add-element-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 160px);
}

.element-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select option {
    background: #1a1a2e;
}

.placement-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.placement-section h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.placement-hint {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.placement-select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.placement-select option {
    background: #1a1a2e;
}

.placement-position {
    display: flex;
    gap: 20px;
}

.placement-position label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 0.9rem;
    cursor: pointer;
}

.placement-position input[type="radio"] {
    accent-color: #0066cc;
}

.add-element-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.add-element-footer .admin-btn {
    flex: 1;
    justify-content: center;
    padding: 14px;
}

.admin-btn-add-element {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
}

.admin-btn-add-element:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* New image container in add modal */
.new-image-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.new-image-preview {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
}

.new-image-upload {
    width: 100%;
}

/* ============================================
   ADDED ELEMENTS STYLES
   ============================================ */
.admin-added-element {
    position: relative;
    animation: elementFadeIn 0.5s ease;
}

@keyframes elementFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.element-delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.admin-edit-mode .admin-added-element:hover .element-delete-btn {
    opacity: 1;
}

.element-delete-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Added card styles */
.admin-card {
    padding: 30px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
}

.admin-card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-card-solid {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-card-gradient {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.admin-card-gradient::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0066cc, #ff6b00);
    z-index: -1;
}

.admin-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.admin-card h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.admin-card p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   DRAG MODE BUTTON
   ============================================ */
.admin-drag-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.admin-drag-section small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.75rem;
}

.admin-btn-drag-mode {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.admin-btn-drag-mode svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
}

.admin-btn-drag-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #9b6dff 0%, #7577f5 100%);
}

.admin-btn-drag-mode:active {
    transform: translateY(0);
}

/* Added image styles */
.admin-added-image {
    margin: 20px 0;
    text-align: center;
}

.admin-added-image img {
    max-width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Added divider */
.admin-divider {
    opacity: 0.8;
}

/* ============================================
   PUBLISH BUTTON
   ============================================ */
.admin-btn-publish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #10b981 !important;
}

.admin-btn-publish:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3) !important;
}

/* ============================================
   SHARE BUTTON
   ============================================ */
.admin-btn-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: #8b5cf6 !important;
}

.admin-btn-share:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3) !important;
}

/* ============================================
   PUBLISH MODAL
   ============================================ */
.publish-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100010;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.publish-modal.active {
    opacity: 1;
    visibility: visible;
}

.publish-modal-content {
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.publish-modal.active .publish-modal-content {
    transform: scale(1) translateY(0);
}

.publish-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
}

.publish-modal-header h3 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
}

.publish-modal-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.publish-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.publish-modal-body {
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.publish-success {
    text-align: center;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin-bottom: 25px;
}

.publish-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.publish-success p {
    color: #10b981;
    margin: 0;
    font-size: 1.1rem;
}

.publish-success code {
    background: rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.publish-steps h4 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 1rem;
}

.publish-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.publish-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: white;
    display: block;
    margin-bottom: 5px;
}

.step-content p {
    color: #9ca3af;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.step-content kbd {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-family: monospace;
    font-size: 0.85rem;
}

.code-block {
    display: block;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #10b981;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block-wrapper {
    position: relative;
}

.code-block-wrapper .code-block {
    padding-right: 80px;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(0, 102, 204, 0.2);
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 6px;
    color: #0066cc;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(0, 102, 204, 0.3);
    color: white;
}

.live-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.live-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

/* Publish tabs */
.publish-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.publish-tab {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.publish-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.publish-tab.active {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-color: transparent;
    color: white;
}

.publish-tab-content {
    display: none;
}

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

.github-token-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* =====================================
   SEO CHECK MODULE
===================================== */
.admin-seo-status {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-top: 10px;
}

.seo-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    font-size: 0.9rem;
}

.seo-score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.seo-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 3px solid;
}

.seo-score-display.good .seo-score-circle {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.seo-score-display.medium .seo-score-circle {
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.seo-score-display.poor .seo-score-circle {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.seo-score-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.seo-score-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-checks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.seo-check-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    border-left: 3px solid;
}

.seo-check-item.pass {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
    color: #a7f3d0;
}

.seo-check-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #fde68a;
}

.seo-check-item.fail {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #fca5a5;
}

/* SEO Modal Styles */
.seo-modal-score {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.seo-big-score {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.seo-modal-score.good .seo-big-score { color: #10b981; }
.seo-modal-score.medium .seo-big-score { color: #f59e0b; }
.seo-modal-score.poor .seo-big-score { color: #ef4444; }

.seo-score-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 8px;
}

.seo-checks-detailed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seo-detail-item {
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 4px solid;
}

.seo-detail-item.pass {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
}

.seo-detail-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

.seo-detail-item.fail {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

.seo-detail-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.seo-detail-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* =====================================
   GITHUB PUSH MODULE
===================================== */
.github-status {
    margin-bottom: 20px;
}

.github-info {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.github-repo-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.github-repo-info svg {
    flex-shrink: 0;
    color: #428FE7;
}

.github-repo-info a {
    color: #428FE7;
    text-decoration: none;
}

.github-repo-info a:hover {
    text-decoration: underline;
}

.github-changes {
    margin: 20px 0;
}

.github-changes label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.github-changes-list {
    max-height: 150px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.change-item {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    padding: 4px 0;
}

.github-instructions {
    padding: 16px;
    background: rgba(11, 25, 147, 0.2);
    border: 1px solid rgba(66, 143, 231, 0.3);
    border-radius: 12px;
    margin-top: 16px;
}

.github-instructions h4 {
    color: #428FE7;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.github-instructions ol {
    margin: 10px 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.8;
}

.github-instructions a {
    color: #428FE7;
}

.github-command {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: #10b981;
    overflow-x: auto;
    margin: 8px 0;
}

.copy-command-btn {
    padding: 8px 16px;
    background: rgba(66, 143, 231, 0.2);
    border: 1px solid rgba(66, 143, 231, 0.4);
    border-radius: 6px;
    color: #428FE7;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-command-btn:hover {
    background: rgba(66, 143, 231, 0.3);
    color: white;
}

/* =====================================
   ANALYTICS DASHBOARD LINKS
===================================== */
.admin-analytics-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.analytics-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.analytics-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.analytics-link.ga4 svg {
    color: #F9AB00;
}

.analytics-link.clarity svg {
    color: #0078D4;
}

.analytics-link div {
    display: flex;
    flex-direction: column;
}

.analytics-link strong {
    color: white;
    font-size: 0.9rem;
}

.analytics-link small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.admin-tracking-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
}

.tracking-item {
    font-size: 0.75rem;
    color: #a7f3d0;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 4px;
}

.tracking-item.active {
    color: #10b981;
}
