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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f3f4;
    color: #202124;
    line-height: 1.6;
}

/* Event Photos */
.event-photos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.event-poster {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
    display: block;
}

.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 20px;
}

.form-header {
    background: white;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-top: 10px solid #673ab7;
}

.form-header h1 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #202124;
}

.form-header p {
    color: #5f6368;
    font-size: 14px;
}

.question-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
    border: 1px solid #dadce0;
    transition: box-shadow 0.2s;
}

.question-card:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.question-header h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #202124;
}

.question-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin-top: 4px;
}

.required {
    color: #d93025;
}

.question-content {
    margin-top: 16px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #dadce0;
    font-size: 16px;
    background: transparent;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-bottom: 2px solid #673ab7;
}

/* File Upload Styles - Google Forms Style */
.file-upload-container {
    width: 100%;
}

.file-upload-area {
    border: 2px dashed #dadce0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #673ab7;
    background: #f3f0ff;
}

.file-upload-area.dragover {
    border-color: #673ab7;
    background: #f3f0ff;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 16px;
}

.upload-icon svg {
    opacity: 0.6;
}

.upload-text .upload-main {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.upload-text .upload-sub {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

.file-preview {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: white;
}

.file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    display: block;
    margin: 0 auto 12px;
    object-fit: cover;
}

.file-info {
    text-align: center;
}

.file-info p {
    font-size: 14px;
    color: #202124;
    margin-bottom: 8px;
    word-break: break-all;
}

.remove-file {
    background: #ea4335;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-reupload {
    background: #1976d2;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s;
}

.btn-reupload:hover {
    background: #1565c0;
}

.reupload-modal .modal-content {
    max-width: 500px;
}

.reupload-modal .file-upload-area {
    padding: 30px 20px;
}

.reupload-modal .upload-icon svg {
    width: 36px;
    height: 36px;
}

.reupload-modal .upload-text .upload-main {
    font-size: 14px;
}

.reupload-modal .upload-text .upload-sub {
    font-size: 12px;
}

.reupload-modal .file-preview img {
    max-width: 150px;
    max-height: 150px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: #673ab7;
}

.radio-option span {
    font-size: 14px;
    color: #202124;
}

.radio-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radio-option.disabled input {
    cursor: not-allowed;
}

.radio-option.disabled span {
    color: #9aa0a6;
}

.submit-section {
    text-align: center;
    padding-top: 8px;
}

.submit-btn {
    background: #673ab7;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 120px;
}

.submit-btn:hover {
    background: #5e35b1;
}

.submit-btn:active {
    background: #512da8;
}

/* Contest Fields Animation */
.contest-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.contest-field.show {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 12px;
    padding-top: 24px;
    padding-bottom: 24px;
}

/* Time Fields Animation */
.time-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.time-field.show {
    max-height: 350px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 12px;
    padding-top: 24px;
    padding-bottom: 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .form-header,
    .question-card {
        padding: 16px;
    }
    
    .form-header h1 {
        font-size: 24px;
    }
    
    .floating-btn {
        bottom: 16px;
        left: 16px;
    }
    
    .floating-btn button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .floating-btn .btn-text {
        display: none;
    }
    
    .floating-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .upload-text .upload-main {
        font-size: 14px;
    }
    
    .upload-text .upload-sub {
        font-size: 12px;
    }
    
    .file-preview img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .event-photos {
        width: 100%;
    }
    
    .event-poster {
        width: 100%;
        object-fit: contain;
    }
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.floating-btn button {
    background: #673ab7;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
    transition: all 0.7s ease;
    font-size: 14px;
    font-weight: 500;
}

.floating-btn button:hover {
    background: #5e35b1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(103, 58, 183, 0.4);
}

.floating-btn svg {
    width: 20px;
    height: 20px;
}

/* Status Modal */
.status-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.status-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: #f1f3f4;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    color: #5f6368;
    font-size: 14px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #673ab7;
    box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.1);
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    background: transparent;
    color: #673ab7;
    border: 1px solid #dadce0;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-primary {
    background: #673ab7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #5e35b1;
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        position: fixed;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Result modal specific mobile styles */
    .result-modal .modal-content,
    .error-modal .modal-content {
        max-width: 95vw;
        max-height: 85vh;
        margin: 0;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        position: fixed;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px 16px;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    
    .user-info {
        padding: 12px;
        margin: 16px 0;
    }
    
    .qr-container {
        padding: 15px;
        margin-bottom: 10px;
    }
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-size: 14px;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Error Field Highlighting */
.error-field {
    border: 2px solid #dc2626 !important;
    background-color: #fef2f2;
}

.error-field input {
    border-bottom-color: #dc2626 !important;
}

/* Result Modal Styles */
.result-modal .modal-content,
.error-modal .modal-content {
    max-width: 500px;
}

.user-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #495057;
    font-weight: 500;
    min-width: 80px;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status.checked-in {
    background: #d4edda;
    color: #155724;
}

.status.not-checked-in {
    background: #f8d7da;
    color: #721c24;
}

.qr-section {
    text-align: center;
}

.qr-section h4 {
    color: #495057;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
}

.qr-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    display: inline-block;
}

.qr-image {
    width: 200px;
    height: 200px;
    display: block;
}

.qr-note {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

.error-message {
    text-align: center;
    padding: 20px;
}

.error-message p {
    color: #dc3545;
    margin-bottom: 12px;
}

.error-message p:last-child {
    color: #6c757d;
    font-size: 13px;
}

@media (max-width: 480px) {
    .qr-image {
        width: 150px;
        height: 150px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .info-item strong {
        min-width: auto;
    }
}