/* ============ ROOT VARIABLES ============ */
:root {
    --apple-white: #f5f5f7;
    --apple-light-gray: #e5e5ea;
    --apple-gray: #86868b;
    --apple-dark-gray: #333336;
    --apple-pink: #ffadaf;
    --apple-pink-hover: #ffadaf;
    --apple-gradient: linear-gradient(to bottom, #f5f5f7, #e5e5ea);
}

/* ============ BASE STYLES ============ */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--apple-white);
    color: var(--apple-dark-gray);
    line-height: 1.5;
    min-height: 100vh;
}

h2 {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

p {
    text-align: center;
    color: var(--apple-gray);
    margin-bottom: 30px;
    font-size: 17px;
}

/* ============ HEADER ============ */
#main-header {
    box-shadow: none;
}

/* ============ STEP INDICATOR ============ */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50px;
    right: 50px;
    background-color: var(--apple-light-gray);
    z-index: 0;
}

.step-indicator div {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--apple-gray);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 30px;
    background-color: white;
    color: var(--apple-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 500;
    border: 2px solid var(--apple-light-gray);
    transition: all 0.3s ease;
    width: 50px;
}

.step.active {
    background-color: var(--apple-pink);
    color: white;
    border-color: var(--apple-pink);
    width: 100px;
    border-radius: 30px;
}

/* ============ FRAME SELECTION ============ */
.frame-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.frame {
    width: 280px;
    height: 260px;
    background: var(--apple-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--apple-light-gray);
    font-weight: 500;
    color: var(--apple-dark-gray);
    font-size: 16px;
}

.frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.frame.selected {
    border: 2px solid var(--apple-pink);
    box-shadow: 0 8px 20px rgba(0, 112, 227, 0.2);
}

/* ============ PHOTO SLOTS ============ */
#photoSlots {
    display: flex;
    gap: 50px;
    margin-bottom: 30px;
    justify-content: center;
}

.photo-slot {
    aspect-ratio: 4/3;
    background: var(--apple-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px dashed var(--apple-gray);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    max-width: 250px;
    width: 100%;
}

.photo-slot span {
    color: var(--apple-gray);
    font-size: 24px;
    font-weight: 500;
}

.photo-slot.active {
    border: 2px solid var(--apple-pink);
    box-shadow: 0 6px 16px rgba(0, 112, 227, 0.2);
    border-style: solid;
}

.photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

span.slot-number {
    display: none;
}

/* Photo Slot Actions */
.photo-slot {
    position: relative;
}

.slot-actions {
    position: absolute;
    display: none;
    top: 5px;
    right: 5px;
}

.photo-slot.active .slot-actions {
    display: block;
}

.more-options-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-options-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-menu button:hover {
    background-color: #f5f5f5;
}

/* ============ BUTTON STYLES ============ */
.btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    outline: none;
}

.btn.primary {
    background-color: var(--apple-pink);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn.primary:hover {
    background-color: var(--apple-pink-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.25);
}

.btn.primary:active {
    transform: translateY(0);
}

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

.btn.back:hover {
    background-color: rgba(0, 113, 227, 0.1);
}

/* Navigation Buttons */
#step1 .nav-buttons {
    display: flex;
    justify-content: flex-end;
}

#step2 .nav-buttons {
    display: flex;
    justify-content: space-between;
}

#step3 .nav-buttons {
    display: flex;
    justify-content: flex-start;
}

.nav-buttons {
    gap: 15px;
    margin-top: 40px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.btn-download, .btn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 16px;
}

.btn-download {
    background-color: var(--apple-pink);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn-download:hover {
    background-color: var(--apple-pink-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.25);
}

.btn-share {
    background-color: white;
    color: var(--apple-dark-gray);
    border: 1px solid var(--apple-light-gray);
}

.btn-share:hover {
    background-color: var(--apple-light-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============ UPLOAD PANELS ============ */
.upload-panel {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-direction: column;
}

.action-panel {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.upload-panel button {
    padding: 12px 24px;
    border-radius: 30px;
    background-color: white;
    border: 1px solid var(--apple-light-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-panel button:hover {
    background-color: var(--apple-light-gray);
}

.media-column {
    margin-bottom: 30px;
}

/* ============ CUSTOMIZATION OPTIONS ============ */
.customization-options {
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Arial, sans-serif;
    text-align: center;
}

.option-group {
    margin-bottom: 20px;
}

.customization-options label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.frame-style-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.frame-style-btn {
    background: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.frame-style-btn span {
    font-weight: 500;
}

.frame-style-btn:hover {
    background: #e9e9e9;
}

.frame-style-btn.active {
    background: #007aff;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 122, 255, 0.3);
}

input[type="color"] {
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="color"]:hover {
    transform: scale(1.1);
}

.sticker-options {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.sticker-btn {
    background: #fff;
    border: none;
    font-size: 20px;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sticker-btn:hover {
    transform: scale(1.1);
    background: #eee;
}

/* ============ PREVIEW SECTION ============ */
.photobooth-preview {
    text-align: center;
}

.photobooth-strip canvas {
    width: 300px;
    border: 1px solid #eee;
}

.photo-frame {
    background: white;
    padding: 15px 15px 40px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
}

.photo-frame:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.photo-frame img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #f0f0f0;
}

.photo-number {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    color: #999;
    font-size: 13px;
    font-weight: 500;
}

.photobooth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--apple-gray);
    font-style: italic;
    display: none;
}

/* ============ CAMERA ELEMENTS ============ */
#video {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    margin: 20px auto;
    display: block;
    background: var(--apple-dark-gray);
}

#captureBtn {
    display: block;
    margin: 20px auto 0;
    padding: 14px 28px;
    background-color: var(--apple-pink);
    color: white;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    transition: all 0.3s ease;
}

#captureBtn:hover {
    background-color: var(--apple-pink-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.25);
}

/* ============ FILE INPUT ============ */
#fileInput {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ============ UTILITY CLASSES ============ */
.hidden {
    display: none !important;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        border-radius: 0;
    }
    
    .step-indicator {
        gap: 20px;
    }
    
    .frame-container {
        gap: 12px;
    }
    
    .frame {
        width: 100px;
        height: 140px;
    }
    
    .upload-panel {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-download, .btn-share {
        width: 100%;
        justify-content: center;
    }
}