/* =========================================
   ENHANCED CAMERA INTERFACE STYLES
   ========================================= */

/* Camera Container */
.camera-container-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Camera Top Bar */
.camera-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1020;
}

.camera-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.camera-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.camera-icon-btn svg {
    width: 22px;
    height: 22px;
}

.camera-mode-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mode-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ar-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #10b981;
    background: rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Camera Preview */
.camera-preview-enhanced {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
}

.camera-preview-enhanced video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* AR Detection Overlay */
.ar-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.detection-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 50%;
    max-width: 400px;
    max-height: 400px;
}

/* Corner Indicators */
.corner-tl,
.corner-tr,
.corner-bl,
.corner-br {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.corner-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-radius: 12px 0 0 0;
}

.corner-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-radius: 0 12px 0 0;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 12px;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-radius: 0 0 12px 0;
}

/* Scanning Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    animation: scanAnimation 2.5s infinite ease-in-out;
}

@keyframes scanAnimation {

    0%,
    100% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Food Detection Card */
.food-detection-card {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    pointer-events: auto;
    animation: slideUpFade 0.4s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.detection-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.detection-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.detection-info {
    flex: 1;
}

.detection-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}

.detection-info p {
    font-size: 0.9rem;
    color: #10b981;
    font-weight: 600;
    margin: 0;
}

.detection-expand {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.detection-expand svg {
    width: 18px;
    height: 18px;
}

/* Macro Bars */
.macro-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.macro-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.macro-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.macro-value {
    color: white;
}

.macro-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.macro-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px currentColor;
}

/* Captured Media */
.captured-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
}

/* Camera Placeholder */
.camera-placeholder-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    z-index: 1;
}

.placeholder-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.placeholder-icon svg {
    width: 50px;
    height: 50px;
    color: rgba(255, 255, 255, 0.4);
}

.camera-placeholder-enhanced p {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
}

.placeholder-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Ghost Mode Toggle */
.ghost-mode-toggle {
    position: absolute;
    top: 80px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1015;
}

.ghost-mode-toggle svg {
    width: 18px;
    height: 18px;
    color: #10b981;
}

.ghost-mode-toggle span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
}

.ghost-toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.ghost-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ghost-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 20px;
}

.ghost-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ghost-toggle-switch input:checked+.ghost-slider {
    background-color: #10b981;
}

.ghost-toggle-switch input:checked+.ghost-slider:before {
    transform: translateX(18px);
}

/* Camera Tools Bar */
.camera-tools-bar {
    position: absolute;
    bottom: 140px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 1015;
}

.camera-tools-bar::-webkit-scrollbar {
    display: none;
}

.camera-tool-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.camera-tool-btn:hover,
.camera-tool-btn.active {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    transform: translateY(-2px);
}

.camera-tool-btn svg {
    width: 24px;
    height: 24px;
}

.camera-tool-btn span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Glow Intensity Panel */
.glow-intensity-panel {
    position: absolute;
    bottom: 220px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 320px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px;
    z-index: 1016;
    animation: slideUpFade 0.3s ease-out;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
}

.intensity-value {
    color: #10b981;
}

.glow-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    margin-bottom: 8px;
}

.glow-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.glow-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Camera Bottom Controls */
.camera-bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 30px 20px;
    z-index: 1020;
}

.camera-control-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.camera-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.camera-control-btn svg {
    width: 24px;
    height: 24px;
}

/* Enhanced Capture Button */
.camera-capture-btn-enhanced {
    position: relative;
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.camera-capture-btn-enhanced:active {
    transform: scale(0.95);
}

.capture-outer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.capture-inner-circle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.camera-capture-btn-enhanced:hover .capture-inner-circle {
    background: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
}

.capture-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 50%;
    animation: pulse 2s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Enhanced Post Form */
.post-form-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1030;
    overflow-y: auto;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.post-form-header-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.post-back-btn {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.post-back-btn svg {
    width: 20px;
    height: 20px;
}

.post-form-header-enhanced h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.post-share-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.post-preview-section {
    padding: 16px;
}

.media-preview-large {
    width: 100%;
    aspect-ratio: 1;
    background: #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
}

.media-preview-large img,
.media-preview-large video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-caption-enhanced {
    width: 100%;
    min-height: 100px;
    border: none;
    padding: 16px;
    font-family: inherit;
    font-size: 1rem;
    color: #111827;
    resize: none;
    background: transparent;
}

.post-caption-enhanced:focus {
    outline: none;
}

.post-caption-enhanced::placeholder {
    color: #9ca3af;
}

.post-options {
    padding: 0 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.calorie-input-enhanced,
.location-input,
.meal-time-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background: white;
}

.calorie-input-enhanced:focus,
.location-input:focus,
.meal-time-select:focus {
    outline: none;
    border-color: #10b981;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .camera-tools-bar {
        gap: 6px;
        padding: 0 8px;
    }

    .camera-tool-btn {
        padding: 10px 12px;
    }

    .camera-tool-btn span {
        font-size: 0.6rem;
    }
}

/* =========================================
   AI CAMERA TOOL - NEW STYLES
   Light, Playful, Interactive Design
   ========================================= */

