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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
}

.loader {
    border: 4px solid #2a2a2a;
    border-top: 4px solid #c8860d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen p {
    color: #808080;
    font-size: 16px;
}

/* Error Screen */
.error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-content {
    text-align: center;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 40px;
}

.error-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.error-content p {
    color: #808080;
    font-size: 16px;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* Timer Header */
.timer-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.timer-header h1 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #e8e8e8;
}

.timer {
    display: inline-flex;
    gap: 5px;
    background: #1a1a1a;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 700;
}

.timer span:first-child,
.timer span:last-child {
    background: #ff4444;
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}

/* Instructions */
.instructions {
    background: #1a1a1a;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.instructions ul {
    list-style: none;
    color: #a0a0a0;
    font-size: 13px;
}

.instructions li {
    padding-left: 15px;
    position: relative;
    margin-bottom: 8px;
}

.instructions li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #666;
}

/* Order Card */
.order-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.order-header h2 {
    font-size: 18px;
    font-weight: 500;
}

.chat-button {
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    border: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.chat-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 134, 13, 0.4);
}

/* Order Info */
.order-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

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

.info-row .label {
    color: #808080;
    font-size: 14px;
}

.info-row .value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.divider {
    height: 1px;
    background: #2a2a2a;
    margin: 20px 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    border: none;
    color: #000;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 134, 13, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    background: transparent;
    border: 1px solid #404040;
    color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: #606060;
    background: #1a1a1a;
}

/* Warning Notice */
.warning-notice {
    background: linear-gradient(135deg, rgba(200, 134, 13, 0.15) 0%, rgba(212, 161, 46, 0.15) 100%);
    border-left: 3px solid #c8860d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.warning-notice p {
    color: #e8e8e8;
    font-size: 13px;
    line-height: 1.5;
}

/* Confirmation Text */
.confirmation-text {
    margin-bottom: 20px;
}

.confirmation-text p {
    color: #a0a0a0;
    font-size: 14px;
}

/* Payment Card */
.payment-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.card-header {
    margin-bottom: 15px;
}

.payment-method-badge {
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.payment-info {
    margin-top: 15px;
}

/* Upload Section */
.upload-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.upload-section h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.upload-hint {
    color: #808080;
    font-size: 12px;
    margin-bottom: 15px;
}

.upload-area {
    background: #0a0a0a;
    border: 2px dashed #404040;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #606060;
    background: #151515;
}

.upload-placeholder svg {
    color: #606060;
}

.preview-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ff4444;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkbox Section */
.checkbox-section {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c8860d;
}

/* Action Buttons */
.action-buttons {
    margin-top: 20px;
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(200, 134, 13, 0.4);
    transition: all 0.3s;
    z-index: 100;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(200, 134, 13, 0.6);
}

/* Chat Modal */
.chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.chat-modal.active {
    display: flex;
}

.chat-container {
    background: #1a1a1a;
    width: 100%;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.chat-status {
    font-size: 12px;
    color: #4ade80;
}

.close-chat {
    background: none;
    border: none;
    color: #808080;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.close-chat:hover {
    color: #ffffff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-content {
    background: #2a2a2a;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.message.sent .message-content {
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    color: #000;
}

.message-time {
    font-size: 11px;
    color: #606060;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #2a2a2a;
    background: #0a0a0a;
}

.chat-input input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: #c8860d;
}

.chat-input button {
    background: linear-gradient(135deg, #c8860d 0%, #d4a12e 100%);
    border: none;
    color: #000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chat-input button:hover {
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding-bottom: 60px;
    }

    .timer-header h1 {
        font-size: 16px;
    }

    .timer {
        font-size: 24px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .info-row .value {
        font-size: 13px;
    }

    .floating-chat-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .chat-container {
        height: 80vh;
        max-height: none;
    }
}
