/* ============================================
   WebAR Project - Futuristic Styles
   Sci-Fi / Neon / Glassmorphism Theme
   ============================================ */

:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #0099ff;
    --bg-dark: #0a0a1a;
    --bg-dark-2: #12121e;
    --bg-dark-3: #1a1a2e;
    --text-light: #ffffff;
    --text-gray: #c0c0e0;
    --success-color: #00ff88;
    --error-color: #ff0055;
    --warning-color: #ffaa00;
    --glass-bg: rgba(10, 10, 26, 0.85);
    --glass-border: rgba(0, 255, 255, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 255, 255, 0.3);
    --shadow-glow-pink: 0 0 20px rgba(255, 0, 255, 0.3);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, var(--bg-dark-3) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   ADMIN BODY
   ============================================ */

.admin-body {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
}

/* ============================================
   ADMIN HEADER
   ============================================ */

.admin-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
}

.logo-glow {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary-color);
    position: relative;
    z-index: 1;
}

.logo-accent {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color);
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: rgba(10, 10, 26, 0.7);
    border: 2px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: var(--text-shadow);
}

.nav-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 153, 255, 0.2));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    font-size: 1.2rem;
}

/* ============================================
   ADMIN CONTAINER
   ============================================ */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.admin-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary, .btn-secondary, .btn-danger {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(20, 20, 40, 0.9);
    border: 2px solid var(--glass-border);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #cc0044);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(255, 0, 85, 0.5);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ============================================
   GALLERIES GRID
   ============================================ */

.galleries-grid, .markers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gallery-card, .marker-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-card::before, .marker-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover, .marker-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.gallery-card:hover::before, .marker-card:hover::before {
    opacity: 1;
}

.gallery-card-header, .marker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.gallery-card-title, .marker-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-card-actions, .marker-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid var(--glass-border);
    color: var(--text-light);
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--glass-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.gallery-card-description, .marker-card-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    text-shadow: var(--text-shadow);
}

.gallery-card-footer, .marker-card-details {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.gallery-badge, .marker-badge {
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid rgba(0, 255, 255, 0.5);
    color: var(--text-light);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8), var(--text-shadow);
}

.marker-badge.type-video { background: rgba(255, 0, 85, 0.1); border-color: rgba(255, 0, 85, 0.3); color: #ff0055; }
.marker-badge.type-3dmodel { background: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.3); color: #00ff88; }
.marker-badge.type-text { background: rgba(255, 170, 0, 0.1); border-color: rgba(255, 170, 0, 0.3); color: #ffaa00; }
.marker-badge.type-image { background: rgba(0, 153, 255, 0.1); border-color: rgba(0, 153, 255, 0.3); color: #0099ff; }

.gallery-badge.theme-neon { background: rgba(0, 255, 255, 0.1); }
.gallery-badge.theme-elegant { background: rgba(200, 200, 200, 0.1); }
.gallery-badge.theme-party { background: rgba(255, 0, 255, 0.1); }
.gallery-badge.theme-nature { background: rgba(0, 255, 0, 0.1); }
.gallery-badge.theme-corporate { background: rgba(0, 100, 200, 0.1); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.2rem;
    text-shadow: var(--text-shadow);
}

/* ============================================
   CHAT INTERFACE
   ============================================ */

.chat-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.chat-message {
    display: flex;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, var(--secondary-color), #cc0088);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.message-content {
    background: rgba(10, 10, 26, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    max-width: 70%;
    line-height: 1.7;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.chat-message.user .message-content {
    background: rgba(30, 10, 30, 0.9);
    border: 2px solid rgba(255, 0, 255, 0.4);
}

.message-content p {
    margin: 0.5rem 0;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 0.5rem 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.chat-input-container {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    background: rgba(20, 20, 40, 0.95);
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    padding: 0.9rem 1.5rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), inset 0 0 10px rgba(0, 255, 255, 0.1);
    background: rgba(20, 20, 40, 1);
}

.btn-send {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
}

/* ============================================
   SETTINGS
   ============================================ */

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
}

.settings-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
}

.settings-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6), var(--text-shadow);
}

.settings-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
    text-shadow: var(--text-shadow);
}

.settings-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.form-control {
    width: 100%;
    background: rgba(20, 20, 40, 0.95);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.9rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), inset 0 0 10px rgba(0, 255, 255, 0.1);
    background: rgba(20, 20, 40, 1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.select-gallery {
    background: rgba(20, 20, 40, 0.95);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    min-width: 200px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    text-shadow: var(--text-shadow);
    opacity: 0.9;
}

input[type="file"] {
    padding: 0.5rem;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark-2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: var(--error-color);
    color: var(--error-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* AI Gallery Preview */
.ai-gallery-header {
    margin-bottom: 2rem;
    text-align: center;
}

.ai-gallery-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ai-markers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-marker-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.ai-marker-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.ai-marker-content {
    flex: 1;
}

.ai-marker-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ai-marker-description {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.95rem;
    text-shadow: var(--text-shadow);
}

.ai-marker-details {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.ai-marker-suggestion {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    text-shadow: var(--text-shadow);
    opacity: 0.9;
}

.ai-marker-justification {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-style: italic;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-dark-2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    color: var(--text-light);
}

.toast-success {
    border-left: 4px solid var(--success-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.toast-error {
    border-left: 4px solid var(--error-color);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.3);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.3);
}

.toast-info {
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.3);
}

/* ============================================
   AR VIEWER STYLES
   ============================================ */

.viewer-body {
    margin: 0;
    overflow: hidden;
}

/* DO NOT style #ar-scene or any a-frame elements (a-scene, a-video, a-entity, etc.)
   as it interferes with AR.js rendering and causes display issues */

/* Loading Screen */
.ar-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-shadow: var(--text-shadow);
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: var(--glass-bg);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Enhanced Loading Progress Styles */
.loading-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

#progress-percentage {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

#progress-items {
    color: var(--text-gray);
}

.download-details {
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.download-details::-webkit-scrollbar {
    width: 6px;
}

.download-details::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.download-details::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 3px;
}

.download-item {
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.download-item.downloading {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    animation: pulse-border 1.5s ease-in-out infinite;
}

.download-item.completed {
    border-color: var(--success-color);
    background: rgba(0, 255, 136, 0.05);
}

.download-item.error {
    border-color: var(--error-color);
    background: rgba(255, 0, 85, 0.05);
}

@keyframes pulse-border {
    0%, 100% { 
        border-color: var(--primary-color);
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    }
    50% { 
        border-color: var(--accent-color);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    }
}

.download-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.download-item-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-item-icon {
    font-size: 1.2rem;
}

.download-item-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.download-item-status.pending {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
}

.download-item-status.downloading {
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary-color);
    animation: pulse-status 1s ease-in-out infinite;
}

.download-item-status.completed {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
}

.download-item-status.error {
    background: rgba(255, 0, 85, 0.2);
    color: var(--error-color);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.download-item-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.download-item-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--primary-color);
}

.download-item-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.download-item-size {
    font-weight: 500;
}

.download-item-speed {
    color: var(--accent-color);
}

/* AR UI Overlay */
.ar-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ar-topbar, .ar-bottombar {
    pointer-events: all;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
}

.ar-bottombar {
    border-top: 1px solid var(--glass-border);
    border-bottom: none;
}

.ar-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ar-info {
    flex: 1;
}

.ar-gallery-name {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.ar-status {
    color: var(--text-light);
    margin: 0.3rem 0 0 0;
    font-size: 0.9rem;
    text-shadow: var(--text-shadow);
}

.ar-btn {
    background: rgba(255, 0, 85, 0.2);
    border: 1px solid rgba(255, 0, 85, 0.5);
    color: var(--error-color);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ar-btn:hover {
    background: rgba(255, 0, 85, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

.ar-bottombar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ar-controls {
    display: flex;
    gap: 1rem;
}

.ar-control-btn {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ar-control-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.1);
}

.control-icon {
    font-size: 1.3rem;
}

.ar-markers-found {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.markers-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.markers-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Marker Info Panel */
.ar-marker-info {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    max-width: 500px;
    pointer-events: all;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.marker-info-title {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.marker-info-description {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* Gallery Selector */
.gallery-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 2rem;
}

.selector-content {
    max-width: 800px;
    width: 100%;
}

.selector-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.selector-description {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-selector-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-selector-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-10px);
}

.gallery-selector-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.gallery-selector-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
    text-shadow: var(--text-shadow);
}

.gallery-selector-info {
    display: flex;
    gap: 0.5rem;
}

/* AR Error Screen */
.ar-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.error-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
    text-shadow: var(--text-shadow);
}

/* AR Modal */
.ar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.ar-modal.active {
    display: flex;
}

.ar-modal-content {
    background: var(--bg-dark-2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ar-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ar-modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.ar-modal-close {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.ar-modal-close:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.ar-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.help-section ol, .help-section ul {
    color: var(--text-light);
    line-height: 1.8;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    text-shadow: var(--text-shadow);
}

.ar-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        width: 100%;
        overflow-x: auto;
    }

    .nav-btn {
        flex-shrink: 0;
    }

    .view-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .select-gallery {
        width: 100%;
    }

    .galleries-grid, .markers-grid {
        grid-template-columns: 1fr;
    }

    .chat-container {
        height: 500px;
    }

    .message-content {
        max-width: 85%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .ar-topbar, .ar-bottombar {
        padding: 0.8rem;
    }

    .ar-gallery-name {
        font-size: 1rem;
    }

    .ar-controls {
        gap: 0.5rem;
    }

    .ar-control-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-list {
        grid-template-columns: 1fr;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.3rem;
    }

    .view-title {
        font-size: 1.5rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .selector-title {
        font-size: 1.8rem;
    }
}

/* ============================================
   LOGIN SCREEN - Enhanced Styles
   ============================================ */

#login-modal input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#login-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#login-modal .btn-primary:active {
    transform: translateY(0);
}

#login-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#login-modal .modal-content {
    animation: fadeInUp 0.5s ease-out;
}
