* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
    background: #10042e;
    min-height: 100vh;
    padding: 40px 20px;
    color: #333;
}

/* Tab form visibility */
.tab-form {
    display: none;
}

.tab-form.active {
    display: block;
}

/* Main container - centers content with max width */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header section with gold glowing title */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header h1 {
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 4px;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header h1 img {
    height: 70px;
    width: auto;
    transition: all 0.3s ease;
}

.header p {
    color: #e0e0e0;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.header i {
    color: #ffd700;
    margin: 0 10px;
}

/* Tab navigation for different fortune types */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    font-weight: 600;
    letter-spacing: 1px;
}

.tab-btn.active {
    background: #b8860b;
    color: white;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Main form card with semi-transparent background */
.fortune-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    margin-bottom: 30px;
}

/* Two-column layout for form sections */
.form-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Form field container */
.form-group {
    width: 100%;
    overflow: hidden;
    margin-bottom: 25px;
}

/* Full width fields span both columns */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form labels with icon spacing */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a2e1f;
    font-size: 1rem;
    letter-spacing: 1px;
}

label i {
    color: #b8860b;
    margin-right: 8px;
    width: 20px;
}

/* Input field styling */
input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5d5b5;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.2);
}

/* Gender selection with color-coded options */
.gender-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.gender-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 32px;
    background: #f0e6d8;
    border: 2px solid #d4b48c;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    color: #5a3e1b;
    min-width: 120px;
}

.gender-option.selected {
    background: #b8860b;
    border-color: #8b5a2b;
    color: white;
}

.gender-option input[type="radio"] {
    display: none;
}

/* Icon color adjustment when selected */
.gender-option.selected i.fa-mars,
.gender-option.selected i.fa-venus {
    color: white;
}

.fa-hand-paper.right-hand {
    transform: scaleX(-1);
}

/* Temple dropdown styling */
.temple-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5d5b5;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Image upload grid layout */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

/* Individual upload box */
.upload-item {
    background: #f9f3e9;
    border: 2px dashed #d4b48c;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

@media (min-width: 1280px) {
	body {
		background: 
			linear-gradient(180deg, #10042e 0%, #000000 100%) !important;
	} 
	
}

/* PC - larger height */
@media (min-width: 769px) {
    .upload-item {
        min-height: 180px;
        padding: 20px;
    }
    
    .upload-item i {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .upload-item span {
        font-size: 0.9rem;
    }
}

.upload-item i {
    font-size: 1.5rem;
    color: #8b5a2b;
    margin-bottom: 5px;
}

.upload-item span {
    font-size: 0.75rem;
    color: #5a3e1b;
    display: block;
}

/* Preview image styling */
.upload-item .preview-img {
    max-width: 100%;
    max-height: 80px;
    border-radius: 8px;
    margin-bottom: 5px;
    display: none;
}

@media (min-width: 769px) {
    .upload-item .preview-img {
        max-height: 100px;
    }
}

.upload-item.has-image .preview-img {
    display: block;
}

.upload-item.has-image i,
.upload-item.has-image span {
    display: none;
}

/* Remove image button */
.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c00;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    border: none;
    z-index: 10;
}

.upload-item.has-image:hover .remove-image {
    display: flex;
}

.remove-image:hover {
    background: #900;
}

/* Override mobile responsive - keep 3 columns even on smallest devices */
@media (max-width: 768px) {
	.input-group .date-dropdowns,
    .input-group > div[style*="flex-wrap"] {
        flex-wrap: nowrap !important;
    }
    
    .input-group select {
        font-size: 15px !important;
        padding: 10px 8px !important;
        min-width: auto !important;
    }
    
    #birthYear, #birthMonth, #birthDay {
        min-width: 0 !important;
        flex: 1 1 0% !important;
        width: auto !important;
    }
    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .upload-item {
        min-height: 130px;
        padding: 10px 5px;
    }
    
    .upload-item i {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .upload-item span {
        font-size: 0.7rem;
    }
    
    .upload-item .preview-img {
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .upload-item {
        min-height: 110px;
        padding: 8px 4px;
    }
    
    .upload-item i {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    .upload-item span {
        font-size: 0.65rem;
    }
    
    .upload-item .preview-img {
        max-height: 50px;
    }
}

/* Remove the conflicting rule that changes to 1 column */
@media (max-width: 360px) {
	.input-group select {
        font-size: 12px !important;
    }
	
    .upload-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Date and time selection layout */
.datetime-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.datetime-field-label {
    font-size: 1rem;
    font-weight: 600;
    color: #4a2e1f;
    letter-spacing: 0.5px;
}

.datetime-field-label i {
    color: #b8860b;
    margin-right: 5px;
    width: 16px;
}

.birth-time-hint {
    font-size: 0.85em;
    color: #6c757d;
    float: right;
}

/* Wish type tags - selectable categories */
.wish-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.wish-tag {
    padding: 8px 16px;
    background: #f0e6d8;
    border: 2px solid #d4b48c;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #5a3e1b;
    font-size: 0.95rem;
}

.wish-tag.selected {
    background: #b8860b;
    border-color: #8b5a2b;
    color: white;
}

/* Expandable Textarea */
.expandable-textarea {
    min-height: 42px;
    max-height: 200px;
    transition: min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    overflow-y: auto;
    line-height: 1.5;
    padding: 10px 12px;
}

.expandable-textarea:focus {
    min-height: 120px;
}

/* Submit button with gradient */
.submit-btn {
    background: linear-gradient(135deg, #b8860b 0%, #8b5a2b 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 10px 20px rgba(139, 90, 43, 0.3);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Button Text */
.btn-text {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

/* Button Icon */
.btn-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.btn-icon i {
    font-size: 1.2rem;
}

.service-footer {
	margin-top: 20px; 
	text-align: center; 
	padding-top: 15px;
}

.service-footer-btn {
    background: none;
    border: none;
    color: #8b7355;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    width: auto;
}

/* Shine Effect on Hover */
.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

/* Active/Pressed Effect */
.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.4);
}

/* Pulse Animation for Attention */
@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 10px 20px rgba(139, 90, 43, 0.3);
    }
    50% {
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6);
    }
}

.submit-btn {
    animation: gentlePulse 2s ease-in-out infinite;
}

.submit-btn:hover {
    animation: none;
}

/* Disabled State */
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.submit-btn:disabled:hover {
    transform: none;
    background: linear-gradient(135deg, #b8860b 0%, #8b5a2b 100%);
}

.submit-btn:disabled:hover .btn-text,
.submit-btn:disabled:hover .btn-icon {
    transform: none;
}

/* Chat styles from PHP file */
.chat-container {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    transition: height 0.3s ease;
}

.master-profile {
    background: linear-gradient(135deg, #2d1f2c 0%, #1a1c2c 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #ffd700;
}

.master-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.master-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.online-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background-color: #00ff00;
    border-radius: 50%;
    transform: translate(30%, -30%);
    z-index: 2;
}

.master-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-info {
    flex: 1;
}

.master-name {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.master-title {
    color: #fff;
    font-size: 0.8rem;
}

.master-mini-title {
    color: #b8a07c;
    font-size: 0.8rem;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f0e6d8;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #b8860b;
    border-radius: 5px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

.message.master {
	scroll-margin-top: 30px;
    justify-content: flex-start;
	color: #4a2e1f;
}

.message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.95rem;
	color: #000;
}

.message.master .message-bubble {
    background: #f2f1f0;
    border-radius: 20px 20px 20px 5px; 
}

.message.user .message-bubble {
    background: #b8860b;
    color: white;
    border-radius: 20px 20px 5px 20px;
}

.input-area {
    padding: 20px;
    background: #fef9f0;
    border-top: 1px solid #e5d5b5;
    display: none;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group input, .input-group select, .input-group textarea {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e5d5b5;
    border-radius: 25px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: #b8860b;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
    border-radius: 20px;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #b8860b;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.option-btn {
    padding: 10px 20px;
    background: #f0e6d8;
    border: 2px solid #d4b48c;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: #5a3e1b;
}

.option-btn.selected {
    background: #b8860b;
    border-color: #8b5a2b;
    color: white;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 20px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #b8860b;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.copy-btn {
    background: #4a2e1f;
    color: white;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

/* Footer section */
.footer {
	text-align: center;
	color: #e0e0e0;
	margin-top: 20px;
	font-size: 0.9rem;
}

.footer i {
	color: #ffd700;
}

/* Result disclaimer */
.check-ref-result-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(74, 46, 31, 0.05);
    border-radius: 8px;
    border-left: 4px solid #b8a07c;
    font-size: 13px;
    color: #b3b2b1;
    line-height: 1.5;
}

.check-ref-result-disclaimer i {
    color: #b3b2b1;
    margin-right: 6px;
}

.result-disclaimer {
    font-size: 0.75rem;
    color: #8b7355;
    text-align: center;
}

.disclaimer {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 12px;
    margin-top: 20px;
    font-size: 0.7rem;
    color: #b8a07c;
    max-width: 1200px;
    margin: 30px auto 20px;
}

.disclaimer-text {
	text-align: left; 
	margin: 15px 0; 
	max-height: 60vh; 
	overflow-y: auto; 
	padding: 0 10px; 
	font-size: 0.85rem; 
	line-height: 1.6; 
	color: #4a2e1f;
}

.disclaimer-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.disclaimer-checkbox input {
    width: 16px;
    height: 16px;
}

.disclaimer-checkbox span {
    cursor: pointer;
    color: white;
    font-size: 0.75rem;
}

/* Loading overlay - PHP version */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.5rem;
    letter-spacing: 3px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-subtext {
    color: #e0e0e0;
    margin-top: 10px;
    font-size: 1rem;
}

.loading-desc {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #e0e0e0;
    opacity: 0.9;
    letter-spacing: 1px;
    animation: gentlePulse 2s ease-in-out infinite;
}

/* Animation keyframes - PHP version */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes slideInItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modal overlay - PHP version */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(5px);
	background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #fff9f0, #fff);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffd700;
    animation: modalSlideIn 0.3s ease;
}

.modal-icon {
    font-size: 4rem;
    color: #b8860b;
    margin-bottom: 20px;
}

.modal-icon i {
    animation: modalPulse 1.5s infinite;
}

.modal-message {
    font-size: 1.2rem;
    color: #4a2e1f;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 500;
}

.modal-button {
    background: linear-gradient(135deg, #b8860b, #8b5a2b);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

#closeDisclaimerBtn {
	padding: 10px 30px; 
	background: #b8860b; 
	color: white; 
	border: none; 
	border-radius: 50px; 
	cursor: pointer;
}

/* Payment Modal - PHP version */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.payment-modal-overlay.active {
    display: flex;
}

.payment-modal {
    background: linear-gradient(135deg, #fff9f0, #fff);
    border-radius: 30px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
    animation: modalSlideIn 0.3s ease;
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5d5b5;
}

.payment-modal-header h2 {
    color: #4a2e1f;
    font-size: 1.5rem;
}

.payment-modal-header i {
    color: #b8860b;
    margin-right: 10px;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #8b7355;
    transition: color 0.3s;
}

.payment-modal-close:hover {
    color: #c00;
}

.payment-methods {
    display: block;
}

.payment-method {
    margin-bottom: 15px;
}

.payment-method:last-child {
    margin-bottom: 0;
}

.payment-button {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.apple-pay-button {
    background: #000;
    color: white;
}

.google-pay-button {
    background: #4285f4;
    color: white;
}

.card-button {
    background: linear-gradient(135deg, #b8860b 0%, #8b5a2b 100%);
    color: white;
}

.pay-now-button {
    background: linear-gradient(135deg, #b8860b 0%, #8b5a2b 100%);
    color: white;
    margin-top: 15px;
}

.card-element {
    padding: 15px;
    border: 2px solid #e5d5b5;
    border-radius: 12px;
    background: white;
    margin-bottom: 15px;
}

.card-errors {
    color: #c00;
    font-size: 0.9rem;
    margin-bottom: 10px;
    min-height: 20px;
}

.general-loading {
    text-align: center;
    padding: 20px;
}

.general-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.payment-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5d5b5;
    text-align: center;
    color: #8b7355;
    font-size: 0.9rem;
}

.payment-modal-footer i {
    color: #635bff;
    margin-right: 5px;
}

.master-select-modal {
    position: fixed;  /* Keep as fixed to center on screen */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;  /* Keep centered */
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.master-select-content {
    position: relative;
    background: linear-gradient(135deg, #2d1f2c 0%, #1a1c2c 100%);
    border-radius: 40px;
    padding: 30px 20px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    border: 2px solid #ffd700;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    
    /* Allow content to scroll within the modal */
    max-height: 85vh;
    overflow-y: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.master-select-content::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.master-select-content {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}


.language-select-content {
	position: relative;
    background: linear-gradient(135deg, #2d1f2c 0%, #1a1c2c 100%);
    border-radius: 40px;
    padding: 30px 20px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 2px solid #ffd700;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
    .master-select-content {
        max-width: 650px;
    }
}

.master-select-content h2 {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.master-carousel-container {
    position: relative;
    margin-bottom: 20px;
}

.master-reference-check {
	padding-top: 10px;
	font-size: 0.8rem;
	color: #f7d881;
	cursor: pointer;
}

.master-carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    
    /* Hide scrollbar for modern browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.master-carousel::-webkit-scrollbar {
    display: none;
}


.master-carousel::-webkit-scrollbar-track {
    background: #3a2a3a;
    border-radius: 10px;
}

.master-carousel::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 10px;
}

.master-option {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.master-option-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.master-option-avatar img,
.master-option-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-option-name {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.master-option-desc {
    color: #ffd700;
    font-size: 0.75rem;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 4px 12px;
    display: inline-block;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.master-chat-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #2d1f2c;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    margin-top: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    max-width: 120px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.carousel-nav-btn {
    background: rgba(255, 215, 0, 0.3);
    border: 1px solid #ffd700;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #ffd700;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
	height: 10px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    width: 20px;
    border-radius: 10px;
    background: #ffd700;
}

.master-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 10px 0;
}

.master-tab-btn {
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 30px;
    color: #b8a07c;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.master-tab-btn.active {
    background: #ffd700;
    color: #2d1f2c;
    border-color: #ffd700;
}

.cta-container {
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-align: center;
    COLOR: #FFF;
}

.cta-title {
    font-size: 1rem;
}

.master-mini-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.master-mini-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5d5b5;
}

.master-mini-name {
    font-weight: bold;
    color: #4a2e1f;
}

.payment-attractive {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 15px;
}

.attractive-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #b8860b;
    margin-bottom: 5px;
}

.attractive-desc {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.attractive-price .price-label {
    font-size: 0.8rem;
    color: #999;
    margin-right: 8px;
}

.attractive-price .price-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #c00;
}

/* Status Message Styles */
.status-message {
    margin: 15px 0;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.status-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    border-radius: 4px;
}

.status-error {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #f44336;
    padding: 12px 15px;
    border-radius: 4px;
}

.status-info i, .status-error i {
    margin-right: 8px;
}

/* Privacy notice */
.privacy-notice {
    background-color: rgba(184, 160, 124, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4a2e1f;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.privacy-notice i {
    color: #b8a07c;
    font-size: 18px;
}

/* Fortune reading results section */
.result-section {
    margin-top: 40px;
    padding: 30px;
    background: #fdf9f2;
    border-radius: 20px;
    border: 2px solid #ffd700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
}

.result-section.active {
    display: block;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5d5b5;
    justify-content: space-between;
}

.result-header i {
    font-size: 2.5rem;
    color: #b8860b;
}

.result-header h2 {
    font-size: 1.3rem;
    color: #4a2e1f;
}

.prediction-content {
    font-family: 'KaiTi', 'Microsoft JhengHei', serif;
    line-height: 1.8;
    font-size: 1rem;
    color: #2c3e50;
    white-space: pre-wrap;
}

.prediction-content p {
    margin-bottom: 15px;
}

/* Error message styling */
.error-message {
    background: #fee;
    color: #c00;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #c00;
    display: none;
}

.error-message.active {
    display: block;
}

/* Result action buttons */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    justify-content: center;
}

.result-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(74, 46, 31, 0.05);
    border-radius: 8px;
    border-left: 4px solid #b8a07c;
    font-size: 13px;
    color: #5c4a37;
    line-height: 1.5;
}

.result-disclaimer i {
    color: #b8a07c;
    margin-right: 6px;
}

/* Copy notification */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #4a2e1f;
    color: #f5f0e6;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.check-ref-section {
    text-align: center;
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

/* Check Reference Section */
.check-ref-page {
    margin: 20px 0 30px;
    width: 100%;
}

.check-ref-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 160, 124, 0.3);
    border-radius: 20px;
    margin-top: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.check-ref-content h3 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.ref-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ref-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #b8a07c;
    border-radius: 50px;
    color: #f5f0e6;
    font-size: 15px;
    transition: all 0.3s ease;
}

.ref-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.ref-input::placeholder {
    color: #b8a07c;
    opacity: 0.7;
}

.ref-check-btn {
    background: #ffd700;
    color: #4a2e1f;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ref-check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ref-note {
    font-size: 13px;
    color: #b8a07c;
    text-align: center;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.ref-note i {
    color: #ffd700;
    margin-right: 5px;
}

.ref-error {
    margin-top: 15px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    border-radius: 8px;
    color: #ff8a8a;
    font-size: 14px;
    text-align: center;
}

/* Back Button Styles */
.back-btn-container {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #b8a07c;
    color: #ffd700;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 60%;
}

.back-btn i {
    font-size: 14px;
    line-height: 1;
}

.back-btn:active {
    transform: translateX(0);
}

/* Upload preference radio buttons */
.upload-preference {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0;
    background: none;
    border-radius: 0;
    transition: none;
    width: 100%;
    margin: 0;
}

.upload-radio-option input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #4a2e1f;
}

.upload-radio-option span {
    font-size: 1rem;
    color: #4a2e1f;
    line-height: 1.4;
    flex: 1;
}

.upload-radio-option small {
    font-size: 14px;
    color: #8b7355;
}

/* Header row */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 8px 0;
    flex-wrap: nowrap;
    width: 100%;
    gap: 15px;
}

.contact-link {
    color: #8b7355;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 40%;
    justify-content: flex-end;
}

.contact-link i {
    font-size: 14px;
    line-height: 1;
}

/* Menu Icon and Slide-out Menu */
.menu-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #4a2e1f;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    height: 100dvh;
    background: linear-gradient(135deg, #1a1030 0%, #3d1f6d 100%);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    color: #f5f0e6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

.slide-menu.active {
    transform: translateX(0);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-header {
    padding: 30px 20px 20px;
    border-bottom: 1px solid #8b7355;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #ffd700;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-menu {
    font-size: 20px;
    cursor: pointer;
    color: #b8a07c;
    transition: color 0.2s ease, transform 0.2s ease;
}

.menu-items {
    flex: 1 1 auto;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #f5f0e6;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    transform: translateX(0);
}

.menu-item i {
    width: 30px;
    font-size: 1em;
    color: #b8a07c;
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-item span {
    font-size: 1em;
    transition: transform 0.3s ease;
}

.menu-footer {
    padding: 20px 25px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 20px));
    border-top: 1px solid #8b7355;
    color: #b8a07c;
    font-size: 0.9em;
    margin-top: auto;
    flex-shrink: 0;
}

/* Smooth inline blur transition */
.blurred-inline {
    filter: blur(4px);
    transition: filter 0.3s ease;
    display: inline;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.contact-info a {
    color: #f5f0e6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.contact-info i {
    width: 20px;
    color: #b8a07c;
    transition: color 0.3s ease, transform 0.3s ease;
}

.slide-menu.active .menu-item {
    animation: slideInItem 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateX(20px);
    will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
    .slide-menu,
    .menu-overlay,
    .menu-item {
        animation: none !important;
        transition: none !important;
    }
}

/* Language Modal Styles */
#languageModalOverlay .modal-content {
    background: linear-gradient(135deg, #fff9f0 0%, #f5f0e6 100%);
    border: 2px solid #8b7355;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#languageModalOverlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Legal/Privacy page styles */
.legal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.legal-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.legal-tab-btn {
    background: none;
    border: none;
    color: #b8a07c;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.legal-tab-btn i {
    margin-right: 8px;
}

.legal-tab-btn.active {
    color: #d4af37;
}

.legal-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #d4af37;
    border-radius: 3px 3px 0 0;
}


.legal-panel {
    display: none;
    color: #e0d5c0;
    line-height: 1.5;
}

.legal-panel.active {
    display: block;
}

.legal-panel h2 {
    color: #d4af37;
    font-size: 1rem;
    margin-bottom: 25px;
    border-bottom: 1px solid #3a2a1a;
    padding-bottom: 10px;
}

.legal-panel h3 {
    color: #d4af37;
    font-size: 1rem;
    margin: 25px 0 15px;
}

.legal-panel h4 {
    color: #b8a07c;
    font-size: 1rem;
    margin: 20px 0 10px;
}

.legal-panel p {
	font-size: 0.9rem;
    margin-bottom: 15px;
}

.legal-panel ul, .legal-panel ol {
    margin: 15px 0;
	font-size: 0.9rem;
    padding-left: 25px;
}

.legal-panel li {
    margin-bottom: 8px;
}

.legal-panel strong {
    color: #d4af37;
}

.legal-panel a {
    color: #d4af37;
    text-decoration: none;
    border-bottom: 1px dotted #d4af37;
}

.date-dropdowns {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.date-dropdowns select {
    flex: 1 1 0;
    min-width: 0px;
    width: auto;
    padding: 10px 12px;
    border: 2px solid #e5d5b5;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
}

/* Hero Modal */
.hero-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 28, 44, 0.95) 0%, rgba(45, 31, 44, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-modal.active {
    opacity: 1;
    visibility: visible;
}

.hero-modal-content {
    background: linear-gradient(135deg, #1a1c2c 0%, #2d1f2c 100%);
    border-radius: 30px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
    animation: modalContentPopIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
    transform-origin: center;
}

@keyframes modalContentPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    80% {
        transform: scale(0.98) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hero-modal-image {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.hero-modal-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: imageGlow 2s ease-in-out infinite;
}

@keyframes imageGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
        border-color: #ffd700;
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
        border-color: #ffed4a;
    }
}

.hero-modal-content-text {
    color: #f5f0e6;
    margin-bottom: 30px;
    text-align: left;
}

.hero-modal-title {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.hero-modal-content-text span {
    font-size: 1rem;
    line-height: 1.6;
    color: #e0e0e0;
    display: block;
}

.hero-modal-btn {
    background: linear-gradient(135deg, #b8860b 0%, #8b5a2b 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(184, 134, 11, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.hero-modal-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-modal-btn:active {
    transform: translateY(0);
}

.hero-modal-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Social Proof Banner */
.social-proof-banner {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2) 0%, rgba(139, 69, 19, 0.2) 100%);
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: subtleGlow 2s ease-in-out infinite;
}

.social-proof-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffd700;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.social-proof-content i {
    font-size: 1.1rem;
}

.social-proof-content i:first-child {
    color: #ffd700;
}

.social-proof-content i:last-child {
    color: #4caf50;
    font-size: 0.9rem;
}

.social-proof-text {
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

@keyframes subtleGlow {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.3);
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.1);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.6);
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    margin: 15px 0 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-text {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #ffd700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.scroll-arrow {
    display: inline-block;
    animation: bounceDown 1.5s ease-in-out infinite;
}

.scroll-arrow i {
    font-size: 1.2rem;
    color: #ffd700;
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-indicator:hover .scroll-arrow {
    animation-duration: 0.8s;
}

.service-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
	background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.select-modal-fa-globe {
	color: #ffd700; 
	position: absolute; 
	top: 15px; 
	left: 15px; 
	font-size: 20px; 
	cursor: pointer;
}

.service-select-content {
    background: linear-gradient(135deg, #fff8f0, #fff0e0);
    border-radius: 30px;
    padding: 30px 20px;
    max-width: 90%;
    width: 90%;
	max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.service-master-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b8860b;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-ask-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a2e1f;
    text-align: center;
    margin-bottom: 25px;
    padding: 0 15px;
    line-height: 1.4;
    background: linear-gradient(135deg, #b8860b, #8b5a2b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.service-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.service-option {
    background: white;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1;
    min-width: 120px;
    border: 2px solid #e5d5b5;
}

.service-option i {
    font-size: 48px;
    color: #b8860b;
    margin-bottom: 10px;
}

.service-name {
    font-size: 1rem;
    font-weight: bold;
    color: #4a2e1f;
    margin-bottom: 5px;
}

.service-desc {
    font-size: 0.8rem;
    color: #8b7355;
}

.wish-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.wish-option {
    background: #f5f0e6;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5d5b5;
}

.temple-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.temple-option {
    background: #f5f0e6;
    padding: 10px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5d5b5;
}

/* ============================================ */
/* HOVER EFFECTS - ONLY ON DEVICES THAT SUPPORT HOVER (DESKTOP) */
/* ============================================ */
@media (hover: hover) {
    /* Tab buttons */
    .tab-btn:hover {
        background: rgba(255, 215, 0, 0.3);
        color: #ffd700;
    }
    
    .tab-btn.active:hover {
        background: #b8860b;
    }
    
    /* Gender options */
    .gender-option[data-gender="male"]:hover {
        background: #a8d8ff;
        border-color: #6bb5ff;
        color: #2c3e66;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(107, 181, 255, 0.3);
    }
    
    .gender-option[data-gender="female"]:hover {
        background: #ffc0cb;
        border-color: #ff90a8;
        color: #8b3a4a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 144, 168, 0.3);
    }
    
    /* Upload items */
    .upload-item:hover {
        border-color: #b8860b;
        background: #f0e6d8;
    }
    
    .upload-item.has-image:hover .remove-image {
        display: flex;
    }
    
    .remove-image:hover {
        background: #900;
    }
    
    /* Wish tags */
    .wish-tag:hover {
        background: #e5d5b5;
        border-color: #b8860b;
    }
    
    /* Submit button */
    .submit-btn:hover::before {
        left: 100%;
    }
    
    .submit-btn:hover {
        transform: translateY(-3px);
        animation: none;
    }
    
    /* Send button */
    .send-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
    }
    
    /* Option buttons */
    .option-btn:hover {
        background: #b8860b;
        border-color: #8b5a2b;
        color: white;
    }
    
    /* Modal buttons */
    .modal-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(184, 134, 11, 0.4);
    }
    
    /* Payment buttons */
    .card-button:hover {
         background: linear-gradient(135deg, #9e7109 0%, #6b431f 100%);
    }
    
    .apple-pay-button:hover {
        background: #333;
    }
    
    .google-pay-button:hover {
        background: #3367d6;
    }
    
    .pay-now-button:hover {
        background: linear-gradient(135deg, #9e7109 0%, #6b431f 100%);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }
    
    .payment-modal-close:hover {
        color: #c00;
    }
    
    /* Hero modal button */
    .hero-modal-btn:hover:before {
        width: 300px;
        height: 300px;
    }
    
    .hero-modal-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(184, 134, 11, 0.5);
        background: linear-gradient(135deg, #9e7109 0%, #6b431f 100%);
    }
    
    .hero-modal-btn:hover i {
        transform: rotate(-10deg) scale(1.1);
    }
    
    /* Service options */
    .service-option:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-color: #b8860b;
    }
    
    .wish-option:hover {
        background: #b8860b;
        color: white;
        border-color: #b8860b;
    }
    
    .temple-option:hover {
        background: #b8860b;
        color: white;
        border-color: #b8860b;
    }
    
    /* Back button */
    .back-btn:hover {
        background: rgba(255, 215, 0, 0.2);
        border-color: #ffd700;
        transform: translateX(-3px);
    }
    
    /* Contact link */
    .contact-link:hover {
        color: #ffd700;
    }
    
    /* Menu items */
    .menu-item:hover {
        background: rgba(139, 115, 85, 0.3);
        border-left-color: #ffd700;
        transform: translateX(5px);
    }
    
    .menu-item:hover i {
        color: #ffd700;
        transform: scale(1.1);
    }
    
    .menu-header h3:hover {
        color: #fff;
    }
    
    .close-menu:hover {
        color: #ffd700;
        transform: scale(1.1);
    }
    
    .contact-info a:hover {
        color: #ffd700;
        transform: translateX(5px);
    }
    
    .contact-info a:hover i {
        color: #ffd700;
        transform: scale(1.1);
    }
    
    /* Language options */
    .language-option:hover {
        background: linear-gradient(135deg, #ffd700, #ffb347) !important;
        color: #2d1f2c; !important;
    }
    
    .language-option:hover i {
        color: #2d1f2c !important;
    }
	
	.language-option.active {
		background: linear-gradient(135deg, #ffd700, #ffb347) !important;
		color: #2d1f2c !important;
	}
    
    .modal-close:hover {
        color: #4a2e1f !important;
        transform: rotate(90deg);
    }
    
    /* Legal tab buttons */
    .legal-tab-btn:hover {
        color: #d4af37;
    }
    
    .legal-panel a:hover {
        color: #f0d890;
        border-bottom-style: solid;
    }
    
    /* Master select modal */
    .master-option:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: scale(1.02);
        border-color: #ffd700;
    }
    
    .master-chat-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
        background: linear-gradient(135deg, #ffe44d, #ffc456);
    }
    
    .carousel-nav-btn:hover {
        background: #ffd700;
        color: #2d1f2c;
    }
    
    .carousel-dot:hover {
        background: #ffd700;
    }
    
    .master-tab-btn:hover:not(.active) {
        background: rgba(255, 215, 0, 0.2);
        color: #ffd700;
    }
    
    /* Ref check button */
    .ref-check-btn:hover {
        background: #ffed4a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    
    /* Scroll indicator */
    .scroll-indicator:hover {
        opacity: 0.8;
    }
    
    .scroll-indicator:hover .scroll-arrow {
        animation-duration: 0.8s;
    }
    
    /* Service footer button */
    .service-footer-btn:hover {
        background: rgba(139, 115, 85, 0.1);
    }
    
    /* Upload radio options */
    .upload-radio-option:hover span {
        color: #b8860b;
    }
}

/* ============================================ */
/* MOBILE RESPONSIVE - REMOVE HOVER ISSUES */
/* ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .chat-messages {
        height: 500px;
		padding-top:20px;
    }  
    .message-bubble {
        max-width: 85%;
        font-size: 0.95rem;
    }
    
    .header {
        text-align: left;
        margin-bottom: 30px;
        padding-left: 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 5px;
    }
    
    .header h1 img {
        height: 40px !important;
    }
    
    .header h1 span {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .header p {
        font-size: 0.8rem;
        text-align: left;
        padding-left: 0;
    }
    
    .tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .tab-btn {
        flex: 1;
        padding: 12px 5px;
        font-size: 0.95rem;
        white-space: nowrap;
        min-width: 0;
        width: auto;
    }
    
    .form-section {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .form-left,
    .form-right {
        margin: 0 !important;
    }
    
    .form-group:last-child {
        margin-bottom: 4px;
    }
    
    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .upload-item {
        padding: 12px;
        min-height: 140px;
        font-size: 0.85rem;
    }
    
    .upload-item i {
        font-size: 2rem;
        margin-bottom: 6px;
    }
    
    .upload-item span {
        font-size: 0.8rem;
    }
    
    .upload-item small {
        font-size: 0.7rem;
    }
    
    .upload-item .preview-img {
        max-height: 90px;
    }
    
    .datetime-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .datetime-group input[type="date"],
    .datetime-group input[type="time"] {
        width: 100%;
    }
    
    .wish-types {
        justify-content: center;
    }
    
    .wish-tag {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .fortune-card {
        padding: 20px;
    }
    
    .temple-select {
        font-size: 0.9rem;
    }
    
    .gender-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .result-header h2 {
        font-size: 1.1rem;
    }
    
    .disclaimer {
        padding: 12px 15px;
        font-size: 0.8rem;
    }

    .footer small {
        font-size: 0.75rem;
    }
    
    .disclaimer-checkbox input[type="checkbox"] {
        width: 12px !important;
        height: 12px !important;
        top: 0;
    }
    
    .disclaimer-checkbox label {
        font-size: 14px !important;
        line-height: 1.3;
    }
    
    .modal-content {
        padding: 25px;
        width: 85%;
    }
    
    .modal-icon {
        font-size: 3rem;
    }
    
    .modal-message {
        font-size: 1rem;
    }
    
    .modal-button {
        padding: 10px 30px;
        font-size: 1rem;
    }
    
    .payment-modal {
        padding: 20px;
        width: 95%;
    }
    
    .payment-button {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .loading-desc {
        font-size: 0.75rem;
        margin-top: 12px;
    }
    
    .header-row {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 20px;
        padding: 6px 0;
    }
    
    .back-btn {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .contact-link {
        font-size: 13px;
    }
    
    .check-ref-section {
        margin-bottom: 10px !important;
    }
    
    .legal-tabs {
        gap: 10px;
    }
    
    .legal-tab-btn {
        padding: 8px 12px;
    }
    
    .form-group label,
    .datetime-field-label {
        font-size: 0.9rem;
    }
    
    .full-width-on-mobile {
        grid-column: 1 / -1;
    }
    
    .menu-footer {
        padding-bottom: 40px;
    }
    
    .menu-icon {
        top: 0px !important;
        right: 0px !important;
    }
    
    .social-proof-banner {
        padding: 8px 15px;
        margin-bottom: 15px;
    }
    
    .social-proof-content {
        gap: 8px;
        font-size: 0.85rem;
    }
    
    .social-proof-content i {
        font-size: 0.9rem;
    }
    
    .social-proof-content i:last-child {
        font-size: 0.8rem;
    }
    
    .scroll-text {
        font-size: 0.9rem;
    }
    
    .scroll-arrow i {
        font-size: 1rem;
    }
    
    /* Disable all transform effects on mobile to prevent stuck states */
    .gender-option:active,
    .wish-tag:active,
    .upload-item:active,
    .option-btn:active {
        transform: scale(0.98);
    }
}

@media (max-width: 767px) {
	.master-profile {
		display: none;
	}
}

@media (max-width: 480px) {
    .master-avatar {
        width: 50px;
        height: 50px;
    }
    
    .master-name {
        font-size: 1rem;
    }
    
    .chat-messages {
        height: 500px;
    }
    
    .header h1 {
        font-size: 1.3rem;
        gap: 6px;
    }
    
    .header h1 img {
        height: 32px !important;
    }
    
    .header h1 span {
        font-size: 1.3rem;
    }
    
    .header p {
        font-size: 0.8rem;
    }
    
    .wish-tag {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    
    .header-row {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .back-btn {
        padding: 6px 12px;
        font-size: 12px;
        max-width: 55%;
    }
    
    .contact-link {
        font-size: 12px;
        max-width: 45%;
        text-align: right;
    }
    
    .back-btn span,
    .contact-link span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .ref-input-group {
        flex-direction: column;
    }
    
    .ref-check-btn {
        width: 100%;
    }
    
    .date-dropdowns {
        gap: 4px;
    }
    
    .date-dropdowns select {
        padding: 4px 12px;
        height: 45px;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 1rem;
        gap: 6px;
    }
    
    .btn-icon i {
        font-size: 0.9rem;
    }
    
    .upload-radio-option span {
        font-size: 14px;
    }
    
    .upload-radio-option small {
        font-size: 12px;
        display: block;
        margin-top: 2px;
    }
    
    .social-proof-content {
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .social-proof-banner {
        padding: 6px 12px;
    }
    
    .scroll-text {
        font-size: 0.9rem;
    }
    
    .scroll-arrow i {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .header h1 img {
        height: 28px !important;
    }
    
    .header h1 span {
        font-size: 1.2rem;
    }
    
    .back-btn i,
    .contact-link i {
        display: none;
    }
    
    .back-btn,
    .contact-link {
        padding: 5px 10px;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

/* Large desktop */
@media (min-width: 1400px) {
    .legal-container {
        max-width: 1200px;
    }
}

@media (min-width: 769px) {
    .menu-icon:hover {
        color: #b38724;
    }
    
    .menu-icon:hover i {
        color: #b38724;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* iOS specific fix */
@supports (-webkit-touch-callout: none) {
    .slide-menu {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
    
    .disclaimer-checkbox {
        display: flex;
        align-items: center;
    }
    
    .disclaimer-checkbox input[type="checkbox"] {
        transform: translateY(0);
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .disclaimer-checkbox label {
        display: flex;
        align-items: center;
        line-height: 1;
    }
	
	select,
    select option {
        color: #333;
        -webkit-text-fill-color: #333;
    }
    
    select:focus {
        color: #333;
        -webkit-text-fill-color: #333;
    }
}