* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #1a1a2e;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.hidden { display: none !important; }

/* Bejelentkezés */
.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: linear-gradient(135deg, #16213e, #0f3460);
    border: 1px solid #00d4ff;
    border-radius: 15px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.logo h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #ffffff;
}

.logo h1 span {
    color: #00d4ff;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.login-box input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.login-box button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.login-box p {
    text-align: center;
    margin-top: 15px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.login-box a {
    color: #00d4ff;
    text-decoration: none;
}

/* Főképernyő */
#main-screen {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
}

.sidebar {
    width: 300px;
    background: linear-gradient(180deg, #16213e, #0f3460);
    border-right: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.my-profile {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 212, 255, 0.05);
}

.avatar {
    font-size: 2.5em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    border: 2px solid #00d4ff;
}

.profile-info {
    flex: 1;
}

.display-name {
    font-weight: bold;
    font-size: 14px;
    color: #ffffff;
}

.status-selector select {
    background: transparent;
    border: none;
    color: #00d4ff;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.status-selector select option {
    background: #16213e;
}

#personal-message {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    padding: 3px 0;
    outline: none;
    margin-top: 5px;
    font-style: italic;
}

.search-box {
    padding: 10px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
}

.search-results {
    position: absolute;
    top: 45px;
    left: 10px;
    right: 10px;
    background: #16213e;
    border: 1px solid #00d4ff;
    border-radius: 8px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.search-result-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.contacts-header {
    padding: 10px 15px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
}

.quick-actions {
    padding: 10px;
    display: grid;
    gap: 8px;
}

.quick-actions button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.quick-actions > button:nth-child(1) {
    background: linear-gradient(135deg, #ffd166, #f4a261);
    color: #1d1d1d;
}

.quick-actions > button:nth-child(2) {
    background: linear-gradient(135deg, #7bd389, #3aa17e);
    color: #081c15;
}

.quick-actions > button:nth-child(3) {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #fff;
}

.quick-actions > button:nth-child(4) {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
}

.quick-actions > button:nth-child(5) {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
}

.admin-actions button {
    background: linear-gradient(135deg, #ff9f1c, #ff6b35);
    color: #111;
}

.admin-actions {
    display: grid;
    gap: 8px;
}

.contact-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.contact-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.contact-item.active {
    background: rgba(0, 212, 255, 0.15);
    border-left: 3px solid #00d4ff;
}

.contact-avatar {
    font-size: 1.8em;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-size: 14px;
    font-weight: bold;
}

.contact-status {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online { background: #00ff88; }
.status-dot.away { background: #ffcc00; }
.status-dot.busy { background: #ff4444; }
.status-dot.offline { background: #666666; }

/* Chat terület */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a1a;
}

.no-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
}

.no-chat-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.tips-view {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tips-hero {
    background: linear-gradient(135deg, rgba(0,212,255,0.16), rgba(15,52,96,0.92));
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 20px;
    padding: 22px;
}

.tips-hero h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.tips-hero p {
    color: rgba(255,255,255,0.72);
    font-size: 14px;
}

.tips-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tips-toolbar input,
.tips-toolbar button {
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 10px 14px;
}

.tips-toolbar button {
    cursor: pointer;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    color: #fff;
    font-weight: bold;
}

.tips-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tips-stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
}

.tips-stat-card span {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tips-stat-card strong {
    font-size: 24px;
}

.tips-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0, 212, 255, 0.16);
    border-radius: 20px;
    padding: 20px;
}

.tips-section h3 {
    margin-bottom: 14px;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
}

.tip-item-win {
    border-color: rgba(0, 255, 136, 0.85);
    background: linear-gradient(135deg, rgba(0,255,136,0.34), rgba(0,120,64,0.20));
    box-shadow: 0 0 0 1px rgba(0,255,136,0.18), 0 10px 24px rgba(0,255,136,0.12);
}

.tip-item-loss {
    border-color: rgba(255, 68, 68, 0.85);
    background: linear-gradient(135deg, rgba(255,68,68,0.34), rgba(140,0,0,0.20));
    box-shadow: 0 0 0 1px rgba(255,68,68,0.18), 0 10px 24px rgba(255,68,68,0.12);
}

.tip-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tip-match {
    font-weight: bold;
    font-size: 16px;
}

.tip-recommendation {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,209,102,0.18), rgba(244,162,97,0.12));
    border: 1px solid rgba(255,209,102,0.26);
    color: #ffe2a8;
    font-weight: 700;
    font-size: 15px;
}

.tip-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tip-badge {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(0,212,255,0.14);
    border: 1px solid rgba(0,212,255,0.2);
}

.tip-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
}

.tip-meta div {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 10px;
}

.tip-meta strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tip-empty {
    color: rgba(255,255,255,0.55);
    padding: 14px 0;
}

.tips-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tips-nav button {
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: bold;
}

.tips-nav button.active {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-color: transparent;
}

.tips-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tips-pagination button {
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: bold;
}

.tips-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

#chat-box {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    font-size: 2em;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    border: 2px solid #00d4ff;
}

.chat-user-info {
    flex: 1;
}

#chat-username {
    font-weight: bold;
    font-size: 16px;
}

#chat-status {
    font-size: 12px;
    color: #00d4ff;
}

.chat-actions button {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 5px;
    transition: all 0.2s;
}

.chat-actions button:hover {
    background: rgba(0, 212, 255, 0.3);
}

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

.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.message.received {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border-bottom-left-radius: 3px;
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
}

.message-input {
    padding: 15px 20px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

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

.message-input input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 25px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.message-input input:focus {
    border-color: #00d4ff;
}

.message-input button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.message-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }


/* ===== MOBIL OPTIMALIZÁLÁS ===== */
@media (max-width: 768px) {

    /* Fő layout */
    #main-screen {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    /* Sidebar */
    .sidebar {
        width: 100%;
        height: 100vh;
        flex-direction: column;
        overflow-y: auto;
    }

    /* Chat area */
    .chat-area {
        width: 100%;
        height: 100vh;
        flex-direction: column;
        display: none;
    }

    

    /* Profil rész */
    .my-profile {
        padding: 10px;
        flex-shrink: 0;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
        flex-shrink: 0;
    }

    .profile-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .display-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .status-selector select {
        font-size: 11px;
        max-width: 120px;
    }

    #personal-message {
        font-size: 11px;
    }

    /* Kijelentkezés gomb */
    .my-profile button {
        font-size: 10px;
        padding: 3px 8px;
        margin-top: 3px;
    }

    /* Keresés */
    .search-box {
        padding: 8px;
        flex-shrink: 0;
    }

    /* Kontakt lista */
    .contacts-list {
        flex: 1;
        overflow-y: auto;
    }

    /* Chat fejléc */
    .chat-header {
        padding: 10px;
        flex-shrink: 0;
        position: relative;
    }

    /* Üzenetek */
    .messages {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        /* Fontos: iOS billentyűzet miatt */
        -webkit-overflow-scrolling: touch;
    }

    .message {
        max-width: 85%;
        font-size: 14px;
    }

    /* Üzenet input - KULCS a billentyűzethez */
    .message-input {
        padding: 8px;
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        /* Ragad az aljához */
        position: sticky;
        bottom: 0;
    }

    .message-input input[type="text"] {
        font-size: 16px !important; /* 16px alatt zoom Android/iOS */
        padding: 10px 12px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1em;
        padding: 6px;
        flex-shrink: 0;
    }

    .send-btn {
        padding: 8px 15px;
        font-size: 14px;
        flex-shrink: 0;
    }

    /* Bejelentkezés */
    .login-box {
        width: 90%;
        padding: 25px 20px;
        margin: 20px auto;
    }

    .logo h1 {
        font-size: 2em;
    }

    /* Előfizetés oldal */
    .plans {
        flex-direction: column;
        height: auto;
        padding: 20px;
        overflow-y: auto;
    }

    .plan-card {
        width: 100%;
    }

    /* Admin */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Vissza gomb */
    #mobile-back-btn {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-right: 10px;
    }

    .chat-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}


/* ===== MOBIL OPTIMALIZÁLÁS ===== */
@media (max-width: 768px) {

    /* Fő layout */
    #main-screen {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    /* Sidebar */
    .sidebar {
        width: 100%;
        height: 100vh;
        flex-direction: column;
        overflow-y: auto;
    }

    /* Chat area */
    .chat-area {
        width: 100%;
        height: 100vh;
        flex-direction: column;
        display: none;
    }

    

    /* Profil rész */
    .my-profile {
        padding: 10px;
        flex-shrink: 0;
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
        flex-shrink: 0;
    }

    .profile-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .display-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .status-selector select {
        font-size: 11px;
        max-width: 120px;
    }

    #personal-message {
        font-size: 11px;
    }

    /* Kijelentkezés gomb */
    .my-profile button {
        font-size: 10px;
        padding: 3px 8px;
        margin-top: 3px;
    }

    /* Keresés */
    .search-box {
        padding: 8px;
        flex-shrink: 0;
    }

    /* Kontakt lista */
    .contacts-list {
        flex: 1;
        overflow-y: auto;
    }

    /* Chat fejléc */
    .chat-header {
        padding: 10px;
        flex-shrink: 0;
        position: relative;
    }

    /* Üzenetek */
    .messages {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        /* Fontos: iOS billentyűzet miatt */
        -webkit-overflow-scrolling: touch;
    }

    .message {
        max-width: 85%;
        font-size: 14px;
    }

    /* Üzenet input - KULCS a billentyűzethez */
    .message-input {
        padding: 8px;
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        /* Ragad az aljához */
        position: sticky;
        bottom: 0;
    }

    .message-input input[type="text"] {
        font-size: 16px !important; /* 16px alatt zoom Android/iOS */
        padding: 10px 12px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1em;
        padding: 6px;
        flex-shrink: 0;
    }

    .send-btn {
        padding: 8px 15px;
        font-size: 14px;
        flex-shrink: 0;
    }

    /* Bejelentkezés */
    .login-box {
        width: 90%;
        padding: 25px 20px;
        margin: 20px auto;
    }

    .logo h1 {
        font-size: 2em;
    }

    /* Előfizetés oldal */
    .plans {
        flex-direction: column;
        height: auto;
        padding: 20px;
        overflow-y: auto;
    }

    .plan-card {
        width: 100%;
    }

    /* Admin */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Vissza gomb */
    #mobile-back-btn {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-right: 10px;
    }

    .chat-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

/* Mobilos keresés */
.search-result-item {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,212,255,0.2);
    touch-action: manipulation;
    user-select: none;
    padding: 12px 15px;
}

.search-result-item:active {
    background: rgba(0,212,255,0.2);
}

.contact-item {
    -webkit-tap-highlight-color: rgba(0,212,255,0.1);
    touch-action: manipulation;
}

@media (max-width: 768px) {
    .chat-area.mobile-active {
        display: flex !important;
        width: 100% !important;
        height: 100vh !important;
        flex-direction: column !important;
    }
    .sidebar.mobile-hidden {
        display: none !important;
    }
    .tips-stats-grid,
    .tip-meta {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    #chat-box {
        padding-top: 45px;
    }
}
