/* ============================
   PHOTOBOOTH SYSTEM - STYLES
   Modern, Elegant & Aesthetic Design
   ============================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #1a1a1a;
    --primary-light: #ffffff;
    --accent-gold: #d4af37;
    --accent-pink: #e94b8b;
    --accent-purple: #8b5fbf;
    --text-main: #2c2c2c;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --bg-light: #f5f5f5;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== GLOBAL STYLES ========== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-pink);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* ========== BUTTONS ========== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-purple) 100%);
    color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(233, 75, 139, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 75, 139, 0.6);
    color: var(--primary-light);
}

.btn-secondary {
    background: var(--primary-dark);
    color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.2);
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-pink);
    color: var(--accent-pink);
}

.btn-outline:hover {
    background: var(--accent-pink);
    color: var(--primary-light);
}

.btn-success {
    background: var(--success);
    color: var(--primary-light);
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: var(--error);
    color: var(--primary-light);
}

.btn-danger:hover {
    background: #da190b;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== HEADER & NAVIGATION ========== */

header {
    background: var(--primary-dark);
    color: var(--primary-light);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: var(--primary-light);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

header h1::before {
    content: "📸";
    font-size: 1.8rem;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--primary-light);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: var(--transition);
}

nav a:hover {
    background: rgba(212, 175, 55, 0.1);
    text-decoration: none;
}

/* ========== FOOTER ========== */

footer {
    background: var(--primary-dark);
    color: var(--primary-light);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0;
}

footer a {
    color: var(--accent-gold);
}

footer a:hover {
    color: var(--accent-pink);
}

/* ========== HERO SECTION ========== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: var(--primary-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233, 75, 139, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    color: var(--primary-light);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease-out;
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

@keyframes slideInDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.start-button {
    animation: slideInUp 0.8s ease-out 0.4s backwards;
}

.start-button .btn-primary {
    font-size: 1.4rem;
    padding: 20px 50px;
    box-shadow: 0 10px 40px rgba(233, 75, 139, 0.5);
}

/* ========== TESTIMONIALS SECTION ========== */

.testimonials-section {
    padding: 4rem 2rem;
    background: var(--primary-light);
}

.testimonials-title {
    text-align: center;
    margin-bottom: 3rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.testimonial-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    cursor: pointer;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.testimonial-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, #ddd 0%, #e8e8e8 100%);
}

.testimonial-info {
    padding: 1.5rem;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.testimonial-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.testimonial-card .btn-primary {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
}

/* ========== CAPTURE PAGE ========== */

.capture-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .capture-container {
        grid-template-columns: 1fr;
    }
}

.capture-section {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.capture-section h2 {
    margin-bottom: 1.5rem;
}

#video-preview {
    width: 100%;
    border-radius: 8px;
    background: var(--primary-dark);
    margin-bottom: 1.5rem;
    max-height: 500px;
    object-fit: contain;
}

.camera-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(233, 75, 139, 0.4);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(233, 75, 139, 0.4);
}

.control-value {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: right;
}

#canvas-preview {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: var(--primary-dark);
    max-height: 500px;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 150px;
}

/* ========== EDIT PAGE ========== */

.edit-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.edit-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .edit-grid {
        grid-template-columns: 1fr;
    }
}

.preview-section {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

#edit-preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-panel {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.control-panel h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.template-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: var(--transition);
    background: var(--bg-light);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.template-item:hover {
    transform: scale(1.05);
    border-color: var(--accent-pink);
}

.template-item.active {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 4px rgba(233, 75, 139, 0.2);
}

.template-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.filter-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.filter-item:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.filter-item.active {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: var(--primary-light);
    border-color: var(--accent-pink);
}

.filter-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin: 0 auto 0.5rem;
    object-fit: cover;
    background: var(--primary-dark);
}

.slider-group {
    margin-bottom: 1.5rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.slider-group input[type="range"] {
    width: 100%;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons .btn {
    flex: 1;
}

/* ========== RESULT PAGE ========== */

.result-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.result-section {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    text-align: center;
}

.result-image {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
}

.qr-code-container {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    display: inline-block;
    margin: 1rem 0;
}

.qr-code-container img {
    width: 300px;
    height: 300px;
    border-radius: 8px;
}

.result-text {
    margin: 1rem 0;
}

/* ========== PAYMENT PAGE ========== */

.payment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.payment-section {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: var(--accent-pink);
    transform: translateY(-4px);
}

.pricing-card.selected {
    border-color: var(--accent-pink);
    background: linear-gradient(135deg, rgba(233, 75, 139, 0.1), rgba(139, 95, 191, 0.1));
    box-shadow: 0 0 0 4px rgba(233, 75, 139, 0.1);
}

.pricing-quantity {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-pink);
    margin-bottom: 0.5rem;
}

.pricing-unit {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pricing-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.qris-section {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.qris-code {
    width: 300px;
    height: 300px;
    margin: 1rem auto;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qris-info {
    background: var(--primary-light);
    border-left: 4px solid var(--accent-pink);
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: left;
}

.qris-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-pink);
    margin: 1rem 0;
}

/* ========== MODALS & DIALOGS ========== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    flex: 1;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--primary-dark);
}

/* ========== LOADING & STATES ========== */

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-pink);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    padding: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border-color: var(--success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border-color: var(--error);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    color: #e65100;
    border-color: var(--warning);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    color: #1565c0;
    border-color: #2196f3;
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 15px;
    }

    nav {
        gap: 1rem;
    }

    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .capture-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    @media (max-width: 480px) {
        .btn-primary {
            padding: 16px 24px;
            font-size: 1rem;
        }

        h1 {
            font-size: 1.5rem;
        }

        .hero h1 {
            font-size: 1.5rem;
        }

        .button-group {
            flex-direction: column;
        }

        .button-group .btn {
            width: 100%;
        }

        .modal-content {
            max-width: 95%;
        }

        .filter-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

/* ========== UTILITY CLASSES ========== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.opacity-50 {
    opacity: 0.5;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    display: grid;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.rounded {
    border-radius: 8px;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.shadow-lg {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ========== PRINT STYLES ========== */

@media print {
    body {
        background: white;
    }

    header, footer, .button-group, .controls-section {
        display: none;
    }

    .result-image {
        max-width: 100%;
    }
}
