/* Glassmorphism Utilities */
.glass-nav {
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: white;
}

.btn-primary.btn-glow {
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary.btn-glow:hover:not(:disabled) {
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Abstract Phone in Hero */
.abstract-phone {
    position: relative;
    width: 250px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    animation: float 6s ease-in-out infinite;
}

.screen-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Scanner Components */
.camera-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: var(--radius-lg);
}

#webcam-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#webcam-container canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 1px);
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(6, 182, 212, 0.1) 0%, transparent 10%, transparent 90%, rgba(6, 182, 212, 0.1) 100%);
    border: 2px solid transparent;
}

.camera-wrapper.scanning .scanner-overlay {
    animation: scanPulse 2s infinite;
    border-color: rgba(6, 182, 212, 0.5);
}

@keyframes scanPulse {
    0% { box-shadow: inset 0 0 0 0 var(--primary-glow); }
    50% { box-shadow: inset 0 0 20px 5px var(--primary-glow); }
    100% { box-shadow: inset 0 0 0 0 var(--primary-glow); }
}

.prediction-result {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

.detected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

.confidence-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Inventory Item Card */
.inventory-item {
    display: flex;
    flex-direction: column;
}

.inventory-item .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.inventory-item .item-icon {
    font-size: 2rem;
    color: var(--primary);
}

.inventory-item .item-count {
    background: rgba(255,255,255,0.1);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

/* Lists */
.missing-list {
    list-style: none;
}

.missing-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.missing-list li::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--danger);
    font-size: 0.8rem;
}

.missing-list li:last-child {
    border-bottom: none;
}

/* AI Loader */
.ai-loader {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(6, 182, 212, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite, glow 2s ease-in-out infinite alternate;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes glow { 
    0% { box-shadow: 0 0 5px var(--primary-glow); }
    100% { box-shadow: 0 0 20px var(--primary-glow), inset 0 0 10px var(--primary-glow); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.glass-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: border-color 0.3s ease;
}

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

.modal-footer {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* History Timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.history-item {
    background: rgba(0,0,0,0.2);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
