* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --halloween-orange: #ff6b35;
    --halloween-purple: #6a0dad;
    --halloween-black: #1a1a1a;
    --halloween-dark: #2b2b2b;
    --halloween-green: #39ff14;
    --halloween-yellow: #ffb700;
    --text-light: #f5f5f5;
    --shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--halloween-black) 0%, var(--halloween-purple) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-light);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(106, 13, 173, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    background: rgba(42, 42, 42, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    box-shadow: var(--shadow), 0 0 100px rgba(106, 13, 173, 0.4);
    border: 2px solid var(--halloween-orange);
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease-in;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3rem;
    color: var(--halloween-orange);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
        white-space: normal;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 107, 53, 0.8), 0 0 40px rgba(255, 107, 53, 0.6);
    }
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--halloween-dark);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--halloween-dark);
    border: 2px solid var(--halloween-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--halloween-orange);
    border-color: var(--halloween-orange);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--halloween-green);
    border-color: var(--halloween-green);
    color: var(--halloween-black);
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.progress-step.active .step-label {
    opacity: 1;
    color: var(--halloween-orange);
    font-weight: bold;
}

/* Form Steps */
.form-step {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.form-step.active {
    display: block;
}

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

.step-content {
    padding: 20px 0;
}

label {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--halloween-orange);
    font-weight: bold;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid var(--halloween-dark);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--halloween-orange);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.help-text {
    font-size: 0.95rem;
    color: var(--text-light);
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.5;
}

.name-warning {
    background: rgba(255, 184, 0, 0.2);
    border-left: 4px solid var(--halloween-yellow);
    color: var(--halloween-yellow);
    padding: 12px 15px;
    margin-top: -15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease-out;
}

/* Contact Options */
.contact-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .contact-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .contact-options {
        grid-template-columns: 1fr;
    }
}

.contact-option {
    cursor: pointer;
}

.contact-option input[type="radio"] {
    display: none;
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--halloween-dark);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.contact-option input[type="radio"]:checked + .option-card {
    background: var(--halloween-orange);
    border-color: var(--halloween-orange);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
    color: white;
}

.option-icon {
    font-size: 2rem;
}

.option-label {
    font-size: 1rem;
    font-weight: bold;
}

.contact-details {
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

.contact-details label {
    font-size: 1.1rem;
    color: var(--halloween-orange);
    margin-bottom: 10px;
}

.contact-details input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Camera */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid var(--halloween-orange);
    background: var(--halloween-black);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .camera-container {
        max-width: 400px;
        min-height: 300px;
    }
}

#camera {
    width: 100%;
    display: block;
}

#preview {
    width: 100%;
    display: block;
}

.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Photos Gallery */
.photos-gallery {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.photo-thumbnail {
    position: relative;
    width: 150px;
    height: 150px;
    border: 3px solid var(--halloween-orange);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--halloween-orange);
}

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

.photo-thumbnail .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--halloween-orange);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.photo-thumbnail .delete-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Frame Selector */
.frame-selector {
    margin: 20px 0;
    text-align: center;
}

.frame-selector label {
    display: block;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--halloween-orange);
}

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

.frame-option {
    padding: 12px 20px;
    border: 2px solid var(--halloween-dark);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.frame-option:hover {
    border-color: var(--halloween-orange);
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.05);
}

.frame-option.active {
    border-color: var(--halloween-orange);
    background: var(--halloween-orange);
    color: white;
}

.frame-preview {
    display: block;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.btn-primary {
    background: var(--halloween-orange);
    color: white;
}

.btn-primary:hover {
    background: #ff8555;
}

.btn-secondary {
    background: var(--halloween-dark);
    color: var(--text-light);
    border: 2px solid var(--halloween-orange);
}

.btn-secondary:hover {
    background: var(--halloween-orange);
    color: white;
}

.btn-success {
    background: var(--halloween-green);
    color: var(--halloween-black);
}

.btn-success:hover {
    background: #4fff2a;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
}

.icon {
    font-size: 1.2rem;
}

/* Loader */
.loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid;
    border-color: var(--halloween-orange) #0000;
    animation: l1 1s infinite;
    margin: 20px auto;
}

@keyframes l1 {
    to {
        transform: rotate(.5turn);
    }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 200px;
}

.loading-container p {
    color: var(--halloween-orange);
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Success Message */
.success-message {
    animation: fadeIn 0.5s ease-in;
}

.success-content {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.success-content h2 {
    color: var(--halloween-green);
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Admin Link */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--halloween-purple);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.6);
    background: #7d1bc5;
}

/* Countdown Overlay */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 15px;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: var(--halloween-orange);
    text-shadow:
        0 0 20px var(--halloween-orange),
        0 0 40px var(--halloween-orange),
        0 0 60px var(--halloween-orange);
    animation: countdown-pulse 1s ease-in-out;
}

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

.countdown-overlay.flash {
    background: rgba(255, 255, 255, 0.9);
    animation: flash-effect 0.3s ease-out;
}

@keyframes flash-effect {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Alert Modal */
.alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

.alert-modal-content {
    background: rgba(42, 42, 42, 0.98);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 107, 53, 0.3);
    border: 2px solid var(--halloween-orange);
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.alert-modal-icon.error {
    color: #dc3545;
}

.alert-modal-icon.warning {
    color: var(--halloween-yellow);
}

.alert-modal-icon.success {
    color: var(--halloween-green);
}

.alert-modal-title {
    font-size: 1.5rem;
    color: var(--halloween-orange);
    margin-bottom: 15px;
    font-weight: bold;
}

.alert-modal-message {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
    white-space: pre-line;
}

.alert-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.alert-modal-buttons .btn {
    min-width: 120px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .countdown-number {
        font-size: 5rem;
    }

    .alert-modal-content {
        padding: 25px;
    }

    .alert-modal-icon {
        font-size: 3rem;
    }

    .alert-modal-buttons {
        flex-direction: column;
    }

    .alert-modal-buttons .btn {
        width: 100%;
    }
}
