/* Custom styles for skin analysis app */
:root {
    --primary-green: #28a745;
    --light-green: #d4edda;
    --dark-green: #1e7e34;
    --white: #ffffff;
    --text-dark: #2c3e50;
    
    /* Default theme colors - hijau */
    --primary-color: #28a745;
    --light-color: #d4edda;
    --dark-color: #1e7e34;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
}

.hero-section {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    padding: 1rem 2rem;
    background-color: var(--light-green);
    gap: 2rem;
}

.hero-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-left img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }
    
    .hero-left {
        max-width: 100%;
        margin-bottom: 2rem;
    }
}

.action-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    margin: 0.5rem;
    min-width: 250px;
    margin-top: 1rem;
}

.privacy-notice {
    background-color: var(--light-green);
    border-left: 4px solid var(--primary-green);
    padding: 0.75rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #20BA5A;
    color: white;
}

.btn-whatsapp i {
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-green);
    border-color: var(--dark-green);
}

.card {
    border-color: #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    background-color: var(--white);
    color: var(--text-dark);
}

.card ul {
    text-align: left;
    padding-left: 20px;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.container {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Image preview container */
.image-preview-container {
    max-width: 100%;
    margin: 1rem auto;
    text-align: center;
}

#imagePreview {
    max-width: 100%;
    max-height: 50vh;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Analysis results styles */
.analysis-result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--white);
}

.result-label {
    font-weight: bold;
    margin-right: 8px;
    color: var(--text-dark);
}

.result-value {
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Product recommendation cards */
.product-card {
    border-radius: 10px;
    transition: transform 0.3s ease;
    height: 100%;
    background-color: var(--white);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img-container {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img {
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
}

.product-price {
    font-weight: bold;
    color: var(--primary-green);
}

/* Steps indicator */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2.5rem;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

.step.active {
    background-color: var(--primary-green);
    color: var(--white);
}

.step-label {
    position: absolute;
    top: 45px;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #666;
}

.step.active .step-label {
    color: var(--primary-green);
    font-weight: bold;
}

/* Add connecting lines between steps */
.steps-container::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 2px;
    background-color: #e0e0e0;
    top: 20px;
    z-index: 1;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cameraFeed, #captureCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Camera Guide Overlay */
.camera-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.face-oval {
    width: 75%;
    height: 85%;
    border: 2px dashed rgba(40, 167, 69, 0.8);
    border-radius: 50% / 45%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.guide-text {
    position: absolute;
    bottom: 20px;
    width: 90%;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 90%;
    width: 400px;
}

.spinner-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
}

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

.animate-pulse {
    animation: pulse 1.5s infinite ease-in-out;
}
