/* Custom Styles for CheckMyPan AI - Bright Modern Theme */
:root {
    --primary-purple: #8B5CF6;
    --primary-purple-light: #A78BFA;
    --primary-purple-dark: #7C3AED;
    --bg-light: #F8FAFC;
    --text-dark: #1F2937;
    --text-secondary: #6B7280;
}

body {
    background-color: var(--bg-light) !important;
    color: var(--text-dark) !important;
    min-height: 100vh;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-purple-dark);
    border-color: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.btn-outline-primary {
    color: var(--primary-purple);
    border-color: var(--primary-purple);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
}

/* Text Colors */
.text-primary {
    color: var(--primary-purple) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-dark {
    color: var(--text-dark) !important;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Form Controls */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #E5E7EB;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-purple-light);
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

/* Image preview styling */
#imagePreview img {
    border: 2px solid #E5E7EB;
    transition: border-color 0.3s ease;
}

#imagePreview img:hover {
    border-color: var(--primary-purple-light);
}

/* Loading animation */
.btn:disabled {
    opacity: 0.7;
}

/* Safety level specific colors */
.text-safe {
    color: #22c55e !important;
}

.text-replace-soon {
    color: #f59e0b !important;
}

.text-replace-immediately {
    color: #ef4444 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .fa-3x {
        font-size: 2em;
    }
    
    .fa-4x {
        font-size: 2.5em;
    }
}

/* Alert enhancements */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--bs-success);
}

.alert-warning {
    border-left-color: var(--bs-warning);
}

.alert-danger {
    border-left-color: var(--bs-danger);
}

.alert-info {
    border-left-color: var(--primary-purple);
}

/* Icon animations */
.fas {
    transition: transform 0.2s ease-in-out;
}

.card:hover .fas {
    transform: scale(1.05);
}

/* Image with badge styling */
.position-relative img {
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.position-relative:hover img {
    border-color: var(--bs-info);
    transform: scale(1.02);
}

/* Safety badge styling */
.badge {
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Share button animation */
#shareBtn {
    transition: all 0.3s ease;
}

#shareBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Share modal styling */
.modal-content {
    background: rgba(33, 37, 41, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Share alert positioning */
.position-fixed {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scanning effect styles - Updated for light theme */
.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
    z-index: 10;
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-purple), var(--primary-purple), transparent);
    box-shadow: 0 0 10px var(--primary-purple), 0 0 20px var(--primary-purple);
    animation: scanVertical 2s linear infinite;
}

.scanner-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-purple);
    box-shadow: 0 0 10px var(--primary-purple);
    animation: cornerPulse 1.5s ease-in-out infinite;
}

.corner.top-left {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.scanner-text {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 212, 255, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes scanVertical {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    }
    100% {
        text-shadow: 0 0 20px rgba(0, 212, 255, 1);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    }
}

/* Product Card Styles - Modern, Border-free Design */
.product-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.15);
}

.product-image-container {
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0;
    flex-grow: 1;
}

.product-title a {
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--primary-purple) !important;
}

.product-action {
    margin-top: auto;
    padding-top: 0.5rem;
}

.product-action .btn {
    width: 100%;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.product-action .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}
