/**
 * 2026 New Year Table Event - Styles
 * Mobile-first, Kakao Talk browser optimized
 */

/* Force dark background on entire page */
html, body {
    background: #1a1a2e !important;
    background-color: #1a1a2e !important;
}

:root {
    --primary: #dc3545;
    --primary-dark: #b02a37;
    --gold: #ffc107;
    --gold-dark: #e0a800;
    --bg-cream: #FDF5E6;
    --text-dark: #2C1810;
    --shadow: rgba(0, 0, 0, 0.15);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bg-dark: #1a1a2e;
    --bg-dark-mid: #16213e;
    --bg-dark-light: #0f3460;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    background: var(--bg-dark) !important;
    background-color: var(--bg-dark) !important;
}

html, body {
    background-color: #1a1a2e !important;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark) !important;
    background-image: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-mid) 50%, var(--bg-dark-light) 100%) !important;
    background-attachment: fixed !important;
    background-color: var(--bg-dark) !important;
    color: #fff !important;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

html {
    background: #1a1a2e !important;
    background-color: #1a1a2e !important;
}

/* 새해 효과 */
.newyear-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: firework 3s ease-out infinite;
}

.firework:nth-child(1) { left: 20%; animation-delay: 0s; background: #ff6b6b; }
.firework:nth-child(2) { left: 50%; animation-delay: 1s; background: #ffd93d; }
.firework:nth-child(3) { left: 80%; animation-delay: 2s; background: #6bcb77; }

@keyframes firework {
    0% { bottom: 0; opacity: 1; transform: scale(1); }
    50% { opacity: 1; }
    100% { bottom: 80%; opacity: 0; transform: scale(3); box-shadow: 0 0 20px currentColor, 0 0 40px currentColor; }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    left: var(--x);
    animation: confetti-fall 5s linear infinite;
    animation-delay: var(--delay);
}

.confetti:nth-child(odd) { background: #ffd93d; border-radius: 50%; }
.confetti:nth-child(even) { background: #ff6b6b; transform: rotate(45deg); }

@keyframes confetti-fall {
    0% { top: -20px; opacity: 1; transform: rotate(0deg) translateX(0); }
    100% { top: 100vh; opacity: 0.3; transform: rotate(720deg) translateX(50px); }
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(10px + var(--safe-top)) 15px 10px;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.lang-selector select {
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: calc(70px + var(--safe-top)) 20px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    opacity: 0.95;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.stat-item.lucky {
    background: var(--gold);
    color: #333;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Main Content */
.main-content {
    padding: 20px 15px calc(30px + var(--safe-bottom));
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Table Display */
.table-display {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.table-surface {
    aspect-ratio: 4/3;
    border-radius: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    min-height: 250px;
}

.table-surface.traditional {
    background: linear-gradient(145deg, #8B4513 0%, #5D3A1A 100%);
    border: 4px solid #3d2510;
}

.table-surface.modern {
    background: linear-gradient(145deg, #f5f5dc 0%, #e8e4d9 100%);
    border: 3px solid #c4b896;
}

.empty-table-msg {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    text-align: center;
    line-height: 1.8;
}

.table-surface.modern .empty-table-msg {
    color: rgba(0,0,0,0.5);
}

/* Food Items */
.food-item {
    position: absolute;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.food-item:hover, .food-item:active {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 20;
}

.food-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-action {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220,53,69,0.4);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #333;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,193,7,0.4);
    color: #333;
}

.btn-outline-custom {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline-custom:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Prompt Card */
.prompt-card {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff !important;
}

.prompt-card h2, .prompt-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff !important;
}

.prompt-card p {
    color: rgba(255,255,255,0.8) !important;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* My Table Section */
.my-table-section {
    margin-top: 25px;
}

.my-table-section .prompt-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,193,7,0.1) 100%);
    border: 2px dashed rgba(255,215,0,0.5);
}

/* Message Section */
.message-section {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 15px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.message-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.message-item:hover {
    background: rgba(255,255,255,0.1);
}

.message-food {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.message-food img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-sender {
    font-weight: 600;
    color: var(--gold);
    font-size: 0.85rem;
}

.message-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-date {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.message-actions {
    display: flex;
    gap: 5px;
}

.like-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 8px;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.like-btn:hover { background: rgba(255,100,100,0.2); }
.delete-btn:hover { background: rgba(255,255,255,0.1); }

/* Short URL Box */
.short-url-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.short-url-box code {
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--gold);
}

/* Modal Styles */
.modal-content {
    background: #fff;
    border-radius: 20px;
    border: none;
    overflow: hidden;
    max-height: 90vh;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 15px 20px;
    border: none;
}

.modal-title {
    font-size: 1.1rem;
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Terms Box */
.terms-box {
    max-height: 150px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.terms-box ul {
    padding-left: 20px;
    margin: 10px 0;
}

/* Style Options - 개선된 스타일 */
.style-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.style-option {
    cursor: pointer;
    flex: 1;
    min-width: 130px;
    max-width: 160px;
}

.style-option input {
    display: none;
}

.style-preview {
    padding: 20px 15px;
    border: 3px solid #ddd;
    border-radius: 16px;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.style-preview .style-icon {
    font-size: 2rem;
}

.style-preview .style-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.style-preview.traditional {
    background: linear-gradient(145deg, #8B4513 0%, #5D3A1A 100%);
    color: #fff;
}

.style-preview.modern {
    background: linear-gradient(145deg, #f5f5dc 0%, #e8e4d9 100%);
    color: #333;
}

.style-option input:checked + .style-preview,
.style-option.selected .style-preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,53,69,0.3);
    transform: scale(1.02);
}

/* Location Status */
.location-status-box {
    background: #f8f9fa;
    border-radius: 12px;
}

.location-confirmed {
    border: 1px solid rgba(40,167,69,0.3);
}

/* Food Grid */
.food-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.food-select-btn {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 70px;
    transition: all 0.2s;
}

.food-select-btn:hover {
    border-color: var(--gold);
    background: #fffbeb;
}

.food-select-btn.selected {
    border-color: var(--primary);
    background: #fff5f5;
    border-width: 3px;
}

.food-select-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.food-select-btn span {
    font-size: 0.65rem;
    text-align: center;
    color: #333;
}

/* Form Controls */
.form-control {
    font-size: 16px !important;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid #ddd;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

/* Toast */
.toast-container {
    z-index: 9999;
}

.toast {
    background: #fff;
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Footer Link */
.text-muted {
    color: rgba(255,255,255,0.6) !important;
    text-decoration: none;
}

.text-muted:hover {
    color: rgba(255,255,255,0.9) !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .hero-section {
        padding-top: calc(60px + var(--safe-top));
    }
    
    .top-bar {
        padding: calc(8px + var(--safe-top)) 10px 8px;
    }
    
    .user-name {
        display: none;
    }
    
    .food-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .style-options {
        flex-direction: row;
    }
    
    .style-option {
        min-width: 120px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
    }
    
    .food-item {
        width: 40px;
        height: 40px;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .main-content {
        max-width: 700px;
        padding: 30px 20px;
    }
    
    .table-surface {
        min-height: 350px;
    }
    
    .food-item {
        width: 60px;
        height: 60px;
    }
    
    .modal-dialog {
        max-width: 500px;
    }
}

/* iOS/Kakao fixes */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .newyear-effects {
        display: none;
    }
}

/* Lucky Pouch */
.lucky-pouch {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    animation: bounce 1s infinite;
    z-index: 15;
}

.lucky-pouch img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

/* Form Check */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Alert */
.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 10px;
}

.alert-info {
    background: #e7f3ff;
    border: 1px solid #b6d4fe;
    color: #084298;
    border-radius: 10px;
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 30px 20px calc(30px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(15, 52, 96, 0.95) 0%, rgba(26, 26, 46, 1) 100%) !important;
    background-color: #1a1a2e !important;
    margin-top: 40px;
    position: relative;
    z-index: 1;
    color: #fff !important;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 10px;
    object-fit: contain;
}

.footer-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Short URL Box - Enhanced */
.short-url-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.15);
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.short-url-box code {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--gold);
    font-weight: 500;
    max-width: 100%;
    overflow-wrap: break-word;
}

.short-url-box .btn {
    white-space: nowrap;
}

/* My Link Section */
.my-link-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.my-link-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gold);
}

.my-link-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    margin-bottom: 0;
}

/* My Table Link Box (in prompt card) */
.my-table-link-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.my-table-link-box code {
    background: rgba(255, 215, 0, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--gold);
    word-break: break-all;
    max-width: 100%;
}

.my-table-link-box .btn {
    white-space: nowrap;
    font-size: 0.8rem;
}


/* New Year Effects */
.newyear-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.newyear-effects .firework {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: fireworkRise 4s ease-out infinite;
}

.newyear-effects .firework:nth-child(1) {
    left: 10%;
    background: #ff6b6b;
    animation-delay: 0s;
}

.newyear-effects .firework:nth-child(2) {
    left: 50%;
    background: #ffd93d;
    animation-delay: 1.5s;
}

.newyear-effects .firework:nth-child(3) {
    left: 85%;
    background: #6bcb77;
    animation-delay: 3s;
}

@keyframes fireworkRise {
    0% {
        bottom: -10px;
        opacity: 1;
        transform: scale(1);
    }
    40% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: scale(2);
        box-shadow: 
            0 0 20px currentColor,
            10px -10px 0 currentColor,
            -10px -10px 0 currentColor,
            10px 10px 0 currentColor,
            -10px 10px 0 currentColor,
            15px 0 0 currentColor,
            -15px 0 0 currentColor,
            0 15px 0 currentColor,
            0 -15px 0 currentColor;
    }
    100% {
        bottom: 80%;
        opacity: 0;
        transform: scale(0);
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    left: var(--x);
    animation: confettiFall 5s linear infinite;
    animation-delay: var(--delay);
}

.confetti:nth-child(odd) {
    background: var(--gold);
    border-radius: 50%;
}

.confetti:nth-child(even) {
    background: var(--primary);
    transform: rotate(45deg);
}

@keyframes confettiFall {
    0% {
        top: -20px;
        opacity: 1;
        transform: rotate(0deg) translateX(0);
    }
    100% {
        top: 100vh;
        opacity: 0.3;
        transform: rotate(720deg) translateX(50px);
    }
}

/* Terms Box */
.terms-box {
    max-height: 180px;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.7;
    -webkit-overflow-scrolling: touch;
}

.terms-box ul {
    padding-left: 1.2rem;
    margin: 8px 0;
}

.terms-box li {
    margin-bottom: 6px;
}

/* Location Status Box */
.location-status-box {
    border-radius: 12px;
    transition: all 0.3s;
}

.location-status-box.success {
    background: #d4edda !important;
    color: #155724;
}

.location-status-box.error {
    background: #f8d7da !important;
    color: #721c24;
}

/* Location Confirmed */
.location-confirmed {
    border: 1px solid rgba(25, 135, 84, 0.3);
}

/* Form Check */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Character Count */
.char-count, .form-text {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
}

/* Message Preview */
.message-preview {
    background: #fff3cd;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.preview-food {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.preview-food img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-content {
    flex: 1;
}

.preview-sender {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.preview-message {
    font-size: 0.8rem;
    color: #666;
}

/* Browse Tables Link */
.text-muted {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
}

.text-muted:hover {
    color: #fff !important;
}

/* In prompt-card context */
.prompt-card .text-muted {
    color: rgba(255,255,255,0.7) !important;
}

.prompt-card .text-muted:hover {
    color: var(--gold) !important;
}

/* Button improvements for mobile */
.btn {
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Modal backdrop for better visibility */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 30px 20px calc(30px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(15, 52, 96, 0.95) 0%, rgba(26, 26, 46, 1) 100%) !important;
    background-color: #1a1a2e !important;
    margin-top: 40px;
    color: #fff !important;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 10px;
    object-fit: contain;
    background: rgba(255,255,255,0.1);
    padding: 5px;
}

.footer-link {
    color: var(--gold) !important;
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    color: #fff !important;
}

/* Short URL Copy Box - Enhanced */
.short-url-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,193,7,0.1) 100%);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.short-url-box .url-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.short-url-box code {
    background: rgba(0,0,0,0.4);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.short-url-box .btn-copy {
    background: var(--gold);
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.short-url-box .btn-copy:hover {
    background: var(--gold-dark);
    transform: translateY(-1px);
}

.short-url-box .btn-copy:active {
    transform: translateY(0);
}

/* Copy Success Animation */
.copy-success {
    animation: copyPulse 0.3s ease;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #28a745; color: #fff; }
    100% { transform: scale(1); }
}

/* My Link Section - Owner's share link */
.my-link-section {
    background: linear-gradient(135deg, rgba(255,215,0,0.2) 0%, rgba(255,193,7,0.1) 100%);
    border: 2px solid rgba(255,215,0,0.4);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.my-link-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}

.my-link-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 10px;
    margin-bottom: 0;
}


/* Top Bar - Updated */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(10px + var(--safe-top)) 15px 10px;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-select {
    padding: 6px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 25px;
}

.lang-select option {
    background: #333;
    color: #fff;
}

.btn-logout, .btn-login {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-logout:hover, .btn-login:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

@media (max-width: 480px) {
    .top-bar-right span {
        display: none;
    }
}

/* ============================================
   FORCE OVERRIDE STYLES - Must be at the end
   ============================================ */

/* Force dark background everywhere */
html,
body,
.container,
.container-fluid,
main,
section,
article,
div.main-content {
    background-color: transparent !important;
}

html {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    background-color: #1a1a2e !important;
    min-height: 100%;
}

body {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    background-color: #1a1a2e !important;
    background-attachment: fixed !important;
    color: #ffffff !important;
}

/* Force white text on dark backgrounds */
.main-content,
.main-content *:not(.btn):not(.form-control):not(.modal-content *):not(.food-select-btn *):not(.terms-box *):not(.alert *) {
    color: #ffffff;
}

/* Ensure footer has proper dark background */
.site-footer,
footer.site-footer {
    background: linear-gradient(180deg, rgba(15, 52, 96, 0.98) 0%, #1a1a2e 100%) !important;
    background-color: #1a1a2e !important;
    color: #ffffff !important;
}

.site-footer *,
footer.site-footer * {
    color: #ffffff !important;
}

.site-footer .footer-link,
footer.site-footer .footer-link {
    color: var(--gold) !important;
}

/* Prompt card text colors */
.prompt-card,
.prompt-card h2,
.prompt-card h3,
.prompt-card p {
    color: #ffffff !important;
}

.prompt-card p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Message section */
.message-section,
.message-section h3,
.message-item,
.message-content,
.message-sender,
.message-text {
    color: #ffffff !important;
}

.message-sender {
    color: var(--gold) !important;
}

.message-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

.message-date {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Empty table message */
.empty-table-msg {
    color: rgba(255, 255, 255, 0.7) !important;
}

.table-surface.modern .empty-table-msg {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* Links */
a.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

a.text-muted:hover {
    color: #ffffff !important;
}

/* Stats bar */
.stats-bar,
.stat-item {
    color: #ffffff !important;
}

/* Hero section */
.hero-section,
.hero-section * {
    color: #ffffff !important;
}

/* My link section */
.my-link-section,
.my-link-title,
.my-link-hint {
    color: #ffffff !important;
}

.my-link-title {
    color: var(--gold) !important;
}

.my-link-hint {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Short URL box */
.short-url-box code {
    color: var(--gold) !important;
}

/* My table link box */
.my-table-link-box code {
    color: var(--gold) !important;
}
