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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: pulse 2s infinite;
}

.dot.connected {
    background: var(--success-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Remote video container (large, top) */
.remote-video-container {
    margin-bottom: 20px;
    width: 100%;
}

.video-main {
    height: 500px;
    width: 100%;
}

/* Bottom section (local video + chat side by side) */
.bottom-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    width: 100%;
}

.video-local {
    height: 400px;
}

.video-wrapper {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.video-wrapper:not(.video-main):not(.video-local) {
    aspect-ratio: 4/3;
}

video, canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hide the raw local video - it's only used for frame processing */
/* The user only sees the blurred canvas */
#local-video {
    display: none !important;
    visibility: hidden !important;
}

#local-canvas {
    background: var(--bg-card);
}

.video-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.blur-indicator {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(99, 102, 241, 0.9);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.blur-indicator:hover {
    background: rgba(99, 102, 241, 1);
    transform: scale(1.05);
}

.blur-indicator.unlocked {
    background: rgba(239, 68, 68, 0.9);
}

.blur-indicator.unlocked:hover {
    background: rgba(239, 68, 68, 1);
}

.waiting-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.waiting-message.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
    transform: translateY(-2px);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.info-card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    height: 400px;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px 20px;
    text-align: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

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

.chat-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

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

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

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

.message-bubble {
    padding: 10px 15px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-message.sent .message-bubble {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .message-bubble {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
    padding: 0 5px;
}

.chat-message.sent .message-time {
    text-align: right;
}

.chat-message.received .message-time {
    text-align: left;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

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

.btn-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

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

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Report Modal Styles */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.report-modal.hidden {
    display: none;
}

.report-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.report-modal-content h2 {
    margin-bottom: 10px;
    color: var(--danger-color);
}

.report-modal-content > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.report-reason {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-reason:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.report-reason input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.report-reason span {
    color: var(--text-primary);
    cursor: pointer;
}

.report-details {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
}

.report-details:focus {
    outline: none;
    border-color: var(--primary-color);
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.report-actions .btn {
    flex: 1;
}

.report-warning {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    font-style: italic;
    margin: 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .video-main {
        height: 350px;
    }

    .bottom-content {
        grid-template-columns: 1fr;
    }

    .video-local {
        height: 300px;
    }

    .chat-container {
        height: 350px;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px; /* Minimum touch target size */
        font-size: 1rem;
    }

    /* Ensure proper spacing for mobile */
    .container {
        padding: 15px;
    }

    /* Make modals more mobile-friendly */
    .gifts-modal-content,
    .report-modal-content {
        padding: 20px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Better button sizing in modals */
    .gifts-modal-content .btn,
    .report-modal-content .btn {
        min-height: 48px;
        padding: 12px 20px;
    }

    /* Wallet tab positioning for mobile - right side middle */
    .wallet-tab {
        top: 50%;
        bottom: auto;
        right: 0;
        transform: translateY(-50%);
        font-size: 0.75rem;
        padding: 12px 8px;
        border-radius: 8px 0 0 8px; /* Rounded on left only */
        min-width: 50px;
        min-height: 60px; /* Touch-friendly */
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .wallet-tab:active {
        transform: translateY(-50%) scale(0.95);
    }

    /* Status bar adjustments */
    .status-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    /* Chat input sizing */
    .chat-input {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px;
    }

    .btn-send {
        min-width: 48px;
        min-height: 48px;
    }

    /* Info cards stacking */
    .info-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .video-main {
        height: 280px;
    }

    .video-local {
        height: 240px;
    }

    .chat-container {
        height: 300px;
    }

    .btn {
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    /* Smaller gift catalog items */
    .gift-catalog {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    }

    .gift-item {
        padding: 12px;
    }

    /* Wallet tab for very small screens */
    .wallet-tab {
        min-width: 45px;
        min-height: 55px;
        padding: 10px 6px;
        font-size: 0.7rem;
    }

    .crypto-wallet-panel {
        width: 95%;
    }
}

/* Landscape mode optimization for small screens */
@media (max-width: 768px) and (orientation: landscape) {
    .video-main {
        height: 250px;
    }

    .video-local {
        height: 200px;
    }

    .bottom-content {
        grid-template-columns: 1fr 1fr;
    }

    .chat-container {
        height: 250px;
    }
}

/* ===========================
   Crypto Wallet & Gifts (Educational Demo)
   =========================== */

.demo-banner {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
}

.btn-gift {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
}

.btn-gift:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

.btn-icon:hover {
    color: var(--danger-color);
}

/* Crypto Wallet Tab Button */
.wallet-tab {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 15px 10px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    line-height: 1.3;
}

.wallet-tab:hover {
    right: 5px;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.4);
}

.wallet-tab.hidden {
    display: none;
}

/* Crypto Wallet Panel */
.crypto-wallet-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px 0 0 12px;
    width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
}

.crypto-wallet-panel.collapsed {
    right: -350px;
}

.crypto-wallet-panel.hidden {
    display: none;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.wallet-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.wallet-content {
    padding: 20px;
}

.total-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.total-balance::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.total-balance .label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.total-balance .amount {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.total-balance .amount.updating {
    animation: pulse 1s ease-in-out;
}

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

.total-balance .live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    margin-left: 8px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.crypto-balances {
    margin-bottom: 20px;
}

.crypto-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.crypto-name {
    font-weight: bold;
    font-size: 1rem;
}

.crypto-amount {
    text-align: right;
}

.crypto-qty {
    font-size: 1.1rem;
    display: block;
}

.crypto-usd {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wallet-addresses {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.wallet-addresses h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.wallet-address {
    margin-bottom: 15px;
}

.wallet-address-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.wallet-address-value {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
    color: #10b981;
}

/* Virtual Gifts Modal */
.gifts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.gifts-modal.hidden {
    display: none;
}

.gifts-modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.gifts-modal-content h2 {
    padding: 0 20px;
    padding-top: 20px;
    margin-bottom: 10px;
}

.gifts-modal-content > p {
    padding: 0 20px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.gift-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
}

.gift-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gift-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.gift-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.gift-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.gift-amount {
    font-family: 'Courier New', monospace;
    color: #10b981;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.gift-usd {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.gifts-actions {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.gift-info {
    padding: 0 20px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Gift notification toast */
.gift-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    animation: slideDown 0.5s ease;
}

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

.gift-notification-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.gift-notification-text {
    text-align: center;
}

.gift-notification-amount {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

.gift-notification-usd {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Wallet Setup Form */
.wallet-setup-form {
    padding: 0 20px 20px 20px;
}

.wallet-input-group {
    margin-bottom: 20px;
}

.wallet-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.wallet-input-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wallet-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

.wallet-input-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Wallet Address Display in Panel */
.wallet-address-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-address-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.wallet-address-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.wallet-address-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

.wallet-address-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-family: system-ui, -apple-system, sans-serif;
}

.wallet-address-status {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Responsive adjustments for crypto wallet */
@media (max-width: 768px) {
    .crypto-wallet-panel {
        right: -100%; /* Start off-screen */
        left: auto;
        width: 90%;
        max-width: 400px;
        top: 0;
        bottom: 0;
        max-height: 100vh;
        overflow-y: auto;
        transform: translateY(0);
        border-radius: 12px 0 0 12px;
        transition: right 0.3s ease-in-out;
        z-index: 1001;
    }

    /* When expanded, slide in from right */
    .crypto-wallet-panel:not(.collapsed) {
        right: 0 !important;
    }

    /* Wallet tab always visible on mobile */
    .crypto-wallet-panel.collapsed ~ .wallet-tab,
    .wallet-tab {
        display: flex !important;
    }

    .crypto-wallet-panel:not(.collapsed) ~ .wallet-tab {
        display: none !important;
    }

    /* Mobile wallet overlay backdrop */
    .wallet-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .wallet-overlay.active {
        display: block;
        opacity: 1;
    }

    .gift-catalog {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    /* Better wallet input sizing */
    .wallet-input-group input {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px;
    }

    /* Crypto balance cards */
    .crypto-balance-item {
        padding: 12px;
    }

    /* Total balance on mobile */
    .total-balance {
        padding: 20px;
    }

    .total-balance .amount {
        font-size: 2rem;
    }
}

/* Extra responsive adjustments for very small screens */
@media (max-width: 576px) {
    .crypto-wallet-panel {
        top: 50px;
    }

    .total-balance .amount {
        font-size: 1.75rem;
    }
}

/* Gift Message Styles */
.gift-message .gift-bubble {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: white !important;
    font-weight: 600;
    border: 2px solid #fbbf24;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: giftPulse 2s ease-in-out;
}

.gift-message.received .gift-bubble {
    background: linear-gradient(135deg, #4ade80, #22c55e) !important;
    border-color: #4ade80;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

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