/* =======================================
    General Layout
======================================= */
.rtt-dashboard-container, .rtt-promosi-container {
    display: flex;
    justify-content: center;
    padding: 20px 10px;
    background: #f9f9f9;
}

.rtt-dashboard-card, .rtt-promosi-card {
    background: #fff;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
}

/* =======================================
    Token Count
======================================= */
.rtt-token-count {
    text-align: right;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

/* =======================================
    Navigation Links
======================================= */
.rtt-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rtt-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
    font-size: 16px;
}

.rtt-navigation a:hover {
    text-decoration: underline;
}

/* =======================================
    Ramalan & Promosi Form
======================================= */
.rtt-form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
    text-align: center;
}

/* Semua input seragam */
.rtt-form-group input[type="text"],
.rtt-form-group input[type="email"],
.rtt-form-group input[type="tel"],
.rtt-form-group input[type="date"],
.rtt-form-group input[type="password"],
.rtt-form-group input[type="number"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: #f7f7f7;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

/* Fokus effect untuk semua input */
.rtt-form-group input[type="text"]:focus,
.rtt-form-group input[type="email"]:focus,
.rtt-form-group input[type="tel"]:focus,
.rtt-form-group input[type="date"]:focus,
.rtt-form-group input[type="password"]:focus,
.rtt-form-group input[type="number"]:focus {
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 115, 170, 0.4);
    outline: none;
}

/* Butang */
.rtt-form-group button {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,114,255,0.4);
    transition: background 0.4s ease, transform 0.2s;
}

.rtt-form-group button:hover {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    transform: translateY(-2px);
}

/* =======================================
    Modal Layout
======================================= */
.rtt-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.rtt-modal-content {
    background: #fff;
    padding: 40px 30px;
    border-radius: 14px;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    margin: 10vh auto; /* ✅ tengah skrin */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}


.rtt-close, .rtt-close-affiliate, .rtt-close-profile {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #aaa;
}

.rtt-close:hover, .rtt-close-affiliate:hover, .rtt-close-profile:hover {
    color: #000;
}


/* =======================================
    Token Options in Modal
======================================= */
.rtt-token-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.rtt-option {
    background: #f4f4f4;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.rtt-option:hover, .rtt-option.active {
    background: #0073aa;
    color: white;
    border-color: #005f8a;
}

/* =======================================
    Button Bayar Dalam Modal
======================================= */
#rtt-bayar-reload {
    background: #28a745;
    color: white;
    border: none;
    padding: 14px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#rtt-bayar-reload:hover {
    background: #218838;
}

#rtt-bayar-reload:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* =======================================
    Share Buttons
======================================= */
.rtt-share-buttons {
    text-align: center;
    margin-top: 20px;
}

.rtt-share-buttons a {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.rtt-share-buttons a:hover {
    background: #2980b9;
}

/* =======================================
    Mobile Optimization
======================================= */
@media (max-width: 500px) {
    .rtt-modal-content {
        padding: 20px;
        max-width: 90%;
    }
    .rtt-dashboard-card, .rtt-promosi-card {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .rtt-modal-content {
        padding: 24px 18px;
        margin: 6vh auto;
        width: calc(100% - 32px); /* ✅ ruang kiri-kanan automatik */
    }
}



/* =======================================
    Polishing untuk Hasil Ramalan (Spacing Kemas)
======================================= */
#rtt-hasil-ramalan {
    margin-top: 30px;
    font-family: "Segoe UI", "Roboto", sans-serif;
    color: #333;
    padding: 0 5px; /* ruang kiri kanan sikit supaya tak terlalu tepi */
}

#rtt-hasil-ramalan h2 {
    font-size: 26px;
    color: #005177;
    margin-top: 40px; /* spacing atas tajuk */
    margin-bottom: 20px; /* spacing bawah tajuk */
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    text-align: center;
}

#rtt-hasil-ramalan p {
    font-size: 18px;
    line-height: 1.9;
    margin-bottom: 20px;
    text-align: justify;
}

#rtt-hasil-ramalan strong {
    display: block;
    margin-top: 20px;
    font-size: 18px;
    color: #222;
}

.rtt-share-section {
    margin-top: 40px;
    text-align: center;
}

.rtt-share-btn {
    display: inline-block;
    margin: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border-radius: 6px;
    font-size: 17px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.rtt-share-btn:hover {
    background: #005177;
}


/* =======================================
    Styling Login Form dalam Dashboard
======================================= */
#loginform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

#loginform label {
    display: none; /* Sembunyikan label supaya lebih bersih */
}

#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: #f7f7f7;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

#loginform input[type="submit"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,114,255,0.4);
    transition: background 0.4s ease, transform 0.2s;
}

#loginform input[type="submit"]:hover {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    transform: translateY(-2px);
}
/* =======================================
    Styling untuk Form Login Custom (rtt-login-form) - FINAL POLISH
======================================= */
#rtt-login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

#rtt-login-form p {
    width: 100%;
    max-width: 400px;
    margin-bottom: 0;
}

#rtt-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    text-align: left;
    width: 100%;
    max-width: 400px;
    font-size: 15px;
}

#rtt-login-form input[type="text"],
#rtt-login-form input[type="password"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: #f7f7f7;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

#rtt-login-form input[type="text"]:focus,
#rtt-login-form input[type="password"]:focus {
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 115, 170, 0.4);
    outline: none;
}

#rtt-login-form input[type="submit"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,114,255,0.4);
    transition: background 0.4s ease, transform 0.2s;
}

#rtt-login-form input[type="submit"]:hover {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    transform: translateY(-2px);
}


/* =======================================
    PAPARAN RAMALAN 
======================================= */

.rtt-highlight-box {
    background: #f0f8ff;
    padding: 20px;
    border: 2px solid #0073aa;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.rtt-highlight-main {
    font-size: 48px; /* Kumpulan sangat besar */
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 8px;
}

.rtt-highlight-subtext {
    font-size: 18px; /* Jumlah nama kecil sikit */
    color: #555;
}


/* =======================================
   LOGOUT
======================================= */
.rtt-logout-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}

.rtt-logout-btn:hover {
    background: #c82333;
}


#rtt-modal-affiliate table {
    border-collapse: collapse;
    margin-top: 10px;
    width: 100%;
}
#rtt-modal-affiliate th, #rtt-modal-affiliate td {
    border-bottom: 1px solid #ddd;
    padding: 8px;
}
#rtt-modal-affiliate th {
    background: #f0f0f0;
}

#rtt-modal-affiliate input[type="text"] {
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: #f7f7f7;
    box-sizing: border-box;
    display: block;
}


@media (min-width: 501px) {
    .rtt-modal-content {
        padding: 40px 30px;
        max-width: 480px;
        margin-top: 8vh;
    }

    #rtt-modal-affiliate input[type="text"] {
        margin: 15px auto;
        padding: 14px 16px;
    }

    .rtt-share-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .rtt-share-buttons a {
        min-width: 120px;
        text-align: center;
    }
}


.button-danger {
    background: #dc3232;
    color: #fff;
    border-color: #a00;
}
.button-danger:hover {
    background: #a00;
}

/* =======================================
    Popup Promosi (form email + phone)
======================================= */
#rtt-promosi-popup {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 9999;
}

#rtt-promosi-popup h2 {
    font-size: 26px;
    margin-bottom: 20px;
}

#rtt-promosi-popup input[type="email"],
#rtt-promosi-popup input[type="tel"] {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: #f7f7f7;
    margin-bottom: 15px;
    box-sizing: border-box;
}

#rtt-promosi-popup input[type="email"]:focus,
#rtt-promosi-popup input[type="tel"]:focus {
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0,115,170,0.3);
    outline: none;
}

#rtt-promosi-popup button {
    width: 100%;
    max-width: 400px;
    height: 48px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,114,255,0.4);
    transition: background 0.3s ease, transform 0.2s;
}

#rtt-promosi-popup button:hover {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    transform: translateY(-2px);
}