/* =========================================
   DABU WEB APP - MODERN UI v2.0
   ========================================= */

:root {
    --primary: #D4AF37;
    --primary-dark: #B8860B;
    --primary-light: #F4E4BC;
    --bg-gray: #f8f9fa;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-family: 'Inter', sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #e9ecef;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family);
    color: var(--text-main);
}

/* PHONE FRAME */
.phone-frame {
    width: 375px;
    height: 812px;
    max-height: 95vh;
    background: var(--white);
    border-radius: 40px;
    border: 10px solid #1a1a1a;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

@media (max-width: 500px) {
    body { background-color: var(--white); }
    .phone-frame {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border: none;
        border-radius: 0;
    }
}

/* APP BAR */
.app-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--white);
    border-bottom: 1px solid #eee;
    z-index: 100;
}

#page-title { 
    font-weight: 800; 
    letter-spacing: 1.5px; 
    font-size: 20px;
    color: var(--primary);
    text-transform: uppercase;
}

.header-left, .header-right { width: 40px; }

/* CONTENT AREA */
.content {
    flex: 1;
    position: relative;
    overflow: hidden; 
    background: var(--bg-gray);
}

.page { 
    display: none; 
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow-y: auto; 
    overflow-x: hidden;
    flex-direction: column;
}
.page.active { display: flex; }

/* LANDING PAGE */
.welcome-screen {
    padding: 24px;
    text-align: center;
    background: var(--white);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-header-full {
    width: 140px;
    margin: 20px 0;
}

.top-promo-banner {
    width: 100%;
    height: 160px;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('promo-ads.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.landing-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.landing-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

/* AUTH BUTTONS */
.auth-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 30px;
}

.btn-gold, .btn-outline {
    flex: 1;
    height: 54px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-gold {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.btn-gold:active { transform: scale(0.98); }

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

/* ARTICLE SECTION */
.article-section {
    text-align: left;
    margin-bottom: 30px;
    width: 100%;
}

.article-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
}

.article-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    transition: 0.2s;
}

.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.article-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.article-info h5 { font-size: 14px; margin-bottom: 2px; }
.article-info p { font-size: 12px; color: var(--text-muted); }

/* FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.feature-item {
    background: #fdfaf0;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f9f0d5;
}

.feature-item i { color: var(--primary); font-size: 20px; margin-bottom: 8px; display: block; }
.feature-item h6 { font-size: 12px; font-weight: 700; }

/* INFO BOX */
.info-box-cream {
    background: #fff9e6;
    padding: 20px;
    border-radius: 16px;
    text-align: left;
    margin-bottom: 30px;
    border: 1px dashed var(--primary);
    width: 100%;
}

.info-box-cream h4 { font-size: 16px; margin-bottom: 8px; }
.info-box-cream p { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 10px; }

/* LANDING FOOTER */
.landing-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
    padding: 20px 0;
    width: 100%;
}

.footer-link {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}

/* AUTH FORM */
.auth-form {
    padding: 30px 24px;
}

.gold-input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    margin-bottom: 16px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    background: var(--white);
    transition: border-color 0.2s;
}

.gold-input:focus { border-color: var(--primary); }

.password-container { position: relative; width: 100%; }
.toggle-password {
    position: absolute;
    right: 16px;
    top: 18px;
    color: #999;
    cursor: pointer;
}

/* SWIPE DECK */
.swipe-deck {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.card-container {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.user-card {
    width: 100%;
    height: 100%;
    background: #ddd;
    position: relative;
    display: flex;
    flex-direction: column;
}

.user-photo {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.user-meta {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 60px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}

.user-meta h3 { font-size: 24px; font-weight: 800; }
.user-meta p { font-size: 14px; opacity: 0.9; }

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

.circle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    font-size: 24px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.1s;
}

.circle-btn:active { transform: scale(0.9); }
.circle-btn.dislike { color: #eb4d4b; }
.circle-btn.like { color: #2ecc71; }

/* MATCHES PAGE */
.match-search-container {
    margin: 0 20px 15px;
    display: flex;
    align-items: center;
    background: #eee;
    border-radius: 12px;
    padding: 0 15px;
    height: 44px;
}

.match-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding-left: 10px;
    font-size: 14px;
    outline: none;
}

#matches-list-container {
    padding: 0 10px;
}

.match-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.match-photo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #f0f0f0;
}

.match-info h4 { font-size: 15px; margin-bottom: 2px; font-weight: 700; }
.match-info p { font-size: 12px; color: var(--text-muted); }

/* CHAT PAGE */
.chat-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: var(--white);
    border-bottom: 1px solid #eee;
    z-index: 100;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-gray);
}

.msg {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.msg.sent {
    align-self: flex-end;
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.msg.received {
    align-self: flex-start;
    background: var(--white);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-input-area {
    padding: 12px 15px;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #eee;
}

.chat-input-area input {
    flex: 1;
    height: 44px;
    padding: 0 15px;
    border-radius: 22px;
    border: 1px solid #eee;
    outline: none;
    font-size: 14px;
    background: #fcfcfc;
}

.chat-input-area button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PROFILE PAGE */
.profile-header-container {
    position: relative;
    height: 200px;
    background: var(--primary);
}

.profile-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header-gradient {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--bg-gray));
}

.profile-content-card {
    padding: 0 24px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.profile-main-name {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-main-info {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.info-card-android {
    background: #e1f5fe;
    padding: 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #0277bd;
    line-height: 1.4;
    border: 1px solid #b3e5fc;
}

/* BOTTOM NAV */
.bottom-nav {
    height: 70px;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
    cursor: pointer;
    transition: 0.2s;
}

.nav-btn i { font-size: 20px; }
.nav-btn span { font-size: 10px; font-weight: 700; margin-top: 4px; }
.nav-btn.active { color: var(--primary); }

/* CHATBOT */
.chatbot-container-float {
    position: absolute;
    bottom: 85px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.chatbot-bubble {
    background: var(--white);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: 1px solid #eee;
}

.chatbot-float {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: linear-gradient(135deg, #d600ff, #8e2de2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 5px 15px rgba(214, 0, 255, 0.4);
    cursor: pointer;
}

.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 20px;
    width: 300px;
    height: 400px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #eee;
}

.chatbot-header {
    background: linear-gradient(135deg, #d600ff, #8e2de2);
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.chatbot-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fcfcfc;
}

.btn-chatbot-topic {
    background: var(--white);
    color: #d600ff;
    border: 1px solid #d600ff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-chatbot-topic:hover { background: #fef0ff; }

.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* CUSTOM POPUP */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    padding: 24px;
    border-radius: 20px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
