* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-in;
}

.header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: min(4rem, 15vw);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #a7a7a7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 100%;
    margin-bottom: 1rem;
    text-align: center;
}

@media (orientation: portrait) {
    .header h1 {
        font-size: 15vw;
        letter-spacing: -0.03em;
        line-height: 1.1;
    }
}

.photo-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.type-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.type-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.type-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.preview-container {
    display: none;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.preview-container.active {
    display: flex;
}

.type-card.selected {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.preview-box {
    width: 400px;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #202020;
}

.preview-box.before::after {
    content: 'Before';
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.7);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.preview-box.after::after {
    content: 'After';
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.7);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    padding: 2rem;
    border-radius: 15px;
    z-index: 1000;
}

.loading.active {
    display: block;
}

.save-button {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 2rem auto;
    display: none;
    transition: transform 0.2s ease, background 0.3s ease;
}

.save-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #45a049, #296c2b);
}

.save-button.visible {
    display: block;
}

.progress-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 15px;
    z-index: 1000;
    width: 300px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
}

/* Add install button styles (keeps parity with inline) */
.install-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    display: none;
    z-index: 2000;
    cursor: pointer;
    min-width: 48px;
    min-height: 44px;
}
.install-btn.visible { display: block; }

