/* ==========================================================================
   THUNGMAKHAM MIAMI BEACH - Ultra-Clean White Minimalist Seminar Theme
   ========================================================================== */

:root {
    /* Color Palette - Clean White & Executive Slate */
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-border-hover: #cbd5e1;
    
    --brand-dark: #0f172a;
    --brand-brown: #4a2c11;
    --accent-gold: #b48328;
    --accent-gold-light: #d4af37;
    
    --fb-blue: #1877F2;
    --fb-blue-hover: #166fe5;
    --event-coral: #e052a0;
    --line-green: #06C755;
    --line-green-hover: #05b34c;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Typography */
    --font-heading: 'Outfit', 'Prompt', sans-serif;
    --font-body: 'Prompt', 'Sarabun', sans-serif;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
                      linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(24px, 5vw, 48px) clamp(12px, 4vw, 24px);
    padding-bottom: max(40px, env(safe-area-inset-bottom));
    position: relative;
    overflow-x: hidden;
}

/* Minimal Subtle Backdrop */
.bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.9) 0%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(22px, 5vw, 28px);
    animation: fadeIn 0.6s ease-out;
    margin: 0 auto;
}

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

/* Profile / Executive Clean Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.avatar-wrapper {
    margin-bottom: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

/* Standalone Clean Logo — No Card Frame or Box */
.avatar-img {
    width: clamp(180px, 52vw, 240px);
    height: auto;
    max-height: 160px;
    object-fit: contain;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.avatar-wrapper:hover .avatar-img {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
}

.brand-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--brand-dark);
    margin-bottom: 4px;
    line-height: 1.25;
}

.brand-subtitle {
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
    color: var(--accent-gold);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.divider-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold-light), transparent);
    margin: 14px 0;
    opacity: 0.8;
}

.brand-description {
    font-size: clamp(0.85rem, 3vw, 0.92rem);
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.55;
    font-weight: 400;
    padding: 0 8px;
}

/* Links Section */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Link Card - Clean White Style */
.link-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: clamp(16px, 4vw, 22px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04),
                0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.28s ease;
}

.link-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.card-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    flex-shrink: 0;
}

.fb-icon {
    background: rgba(24, 119, 242, 0.1);
    border: 1px solid rgba(24, 119, 242, 0.25);
    color: #1877F2;
}

.fb-icon-alt {
    background: rgba(224, 82, 160, 0.1);
    border: 1px solid rgba(224, 82, 160, 0.25);
    color: #e052a0;
}

.line-icon {
    background: rgba(6, 199, 85, 0.1);
    border: 1px solid rgba(6, 199, 85, 0.25);
    color: #06C755;
}

.text-box {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.card-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 3px;
}

.tag-line {
    color: #059b40;
}

.card-title {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 3.6vw, 1.1rem);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.card-desc {
    font-size: clamp(0.78rem, 2.7vw, 0.85rem);
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
    font-weight: 400;
}

/* Card Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.btn {
    font-family: var(--font-body);
    font-size: clamp(0.88rem, 3vw, 0.92rem);
    font-weight: 500;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 44px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    flex: 1;
    padding: 10px 18px;
    color: #ffffff;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-fb {
    background: #1877F2;
}

.btn-fb:hover {
    background: #166fe5;
}

.btn-fb-alt {
    background: #e052a0;
}

.btn-fb-alt:hover {
    background: #c8418b;
}

.btn-line {
    background: var(--line-green);
}

.btn-line:hover {
    background: #05b34c;
}

.btn-icon {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-secondary);
    font-size: 1rem;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: var(--brand-dark);
}

/* Footer Tools */
.footer-tools {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.tool-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 2.6vw, 0.84rem);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
    min-height: 40px;
}

.tool-btn:hover {
    background: #f8fafc;
    color: var(--brand-dark);
    border-color: #94a3b8;
}

.copyright-text {
    font-size: 0.76rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
    font-weight: 400;
}

/* Modal Overlay */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-lg);
    width: calc(100% - 20px);
    max-width: 360px;
    padding: clamp(20px, 5vw, 26px);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--brand-dark);
}

.modal-header {
    text-align: center;
    margin-bottom: 16px;
}

.modal-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 4vw, 1.2rem);
    font-weight: 600;
    color: var(--brand-dark);
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 400;
}

.qr-container {
    background: #ffffff;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-box img, .qr-code-box canvas {
    display: block;
    width: clamp(150px, 45vw, 170px) !important;
    height: clamp(150px, 45vw, 170px) !important;
}

.modal-url-text {
    font-size: 0.74rem;
    color: var(--text-muted);
    word-break: break-all;
    text-align: center;
    margin-bottom: 16px;
    max-width: 250px;
}

.modal-actions {
    width: 100%;
}

.modal-btn {
    width: 100%;
    background: var(--brand-dark);
    color: #ffffff;
    font-weight: 600;
    padding: 12px;
}

.modal-btn:hover {
    background: #1e293b;
}

/* Toast */
.toast {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: clamp(0.84rem, 2.8vw, 0.88rem);
    font-weight: 400;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    color: #4ade80;
    font-size: 1rem;
}
