/* Absen specific styles */
.camera-section {
    background: #232526;
    color: #f1f1f1;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.camera-container {
    position: relative;
    max-width: 640px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #181818;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.camera-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid #d1d1d4;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.3);
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: 1px solid #d1d1d4;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    background: #232526;
    color: #d1d1d4;
}

.btn-primary {
    background: #d1d1d4;
    color: #232526;
}

.btn-primary:hover {
    background: #6b6dd2;
    color: #fff;
}

.btn-success {
    background: #4CAF50;
    color: #fff;
}

.btn-success:hover {
    background: #45a049;
    color: #fff;
}

.btn-secondary {
    background: #414345;
    color: #f1f1f1;
}

.btn-secondary:hover {
    background: #232526;
    color: #d1d1d4;
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

.btn-danger:hover {
    background: #da190b;
    color: #fff;
}

.preview-section {
    background: #232526;
    color: #f1f1f1;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

#photoPreview {
    max-width: 300px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #d1d1d4;
}

.preview-controls {
    margin-top: 20px;
}

/* Polaroid Gallery Styles */
.gallery-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.polaroid-scroll-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    padding-bottom: 20px;
}

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(120px, 1fr) );
    gap: 15px;
    min-width: 900px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px 20px 40px 20px;
    /* Allow vertical scroll if needed */
    max-height: 80vh;
    overflow-y: auto;
}

.polaroid {
    background: #181818;
    color: #f1f1f1;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.3s ease;
    position: relative;
    aspect-ratio: 3/4;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.1);
    z-index: 10;
}

.polaroid.empty {
    background: #181818;
}

.polaroid-image {
    width: 100%;
    height: 75%;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
    border: 2px solid #d1d1d4;
}

.polaroid-caption {
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    color: #f1f1f1;
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.polaroid.empty .polaroid-caption {
    color: #d1d1d4;
    font-style: italic;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #232526;
    color: #f1f1f1;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 400px;
    text-align: center;
}

.modal-polaroid {
    width: 300px;
    height: 400px;
    background: #232526;
    color: #f1f1f1;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin: 0 auto;
    animation: polaroidDrop 0.5s ease;
}

.modal-polaroid img {
    width: 100%;
    height: 75%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    border: 2px solid #d1d1d4;
}

.modal-polaroid .caption {
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #d1d1d4;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes polaroidDrop {
    0% {
        transform: translateY(-100px) rotate(10deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .camera-container {
        margin: 0 auto 15px;
    }
    
    .camera-frame {
        width: 150px;
        height: 150px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin: 5px;
    }
    
    .polaroid-scroll-wrapper {
        max-width: 100vw;
        padding-bottom: 10px;
    }
    .polaroid-grid {
        grid-template-columns: repeat( auto-fill, minmax(100px, 1fr) );
        gap: 10px;
        min-width: 400px;
        max-width: 100vw;
        padding: 0 5px;
        max-height: 70vh;
    }
    
    .modal-polaroid {
        width: 250px;
        height: 333px;
    }
}