/* RushLoader Shared Layout & Theme Styles */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: whitesmoke;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Navbar */
.brand-star {
    color: #FFD700;
}

.navbar-nav .nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #0d6efd;
}

@media (max-width: 767.98px) {
    .navbar-nav .nav-link.active {
        border-bottom: none;
        padding-left: 0.5rem;
        border-left: 3px solid #0d6efd;
    }
}

/* Floating Telegram Button */
#telegram-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#telegram-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

#telegram-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#telegram-button img {
    width: 24px;
    height: 24px;
}

/* Dashboard Cards */
.dashboard-container {
    margin-top: 20px;
}

.dash-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    color: #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.dash-card h4 {
    font-size: 1.15rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #007bff;
}

.dash-card p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.dash-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #007bff;
    display: inline-block;
}

.countdown-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ff4d4d;
}

@media (max-width: 768px) {
    .dash-card h4 {
        font-size: 1rem;
    }
    .dash-card i {
        font-size: 1.5rem;
    }
}

/* Keys Page */
.key-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.key-card-header {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

#datatable td {
    white-space: nowrap;
    vertical-align: middle;
}

.referral-card .table {
    font-size: 0.85rem;
}

.referral-card .table th,
.referral-card .table td {
    padding: 0.45rem 0.4rem;
    vertical-align: middle;
    white-space: nowrap;
}

.referral-card .table-responsive {
    margin-top: 0;
}

.user-key-clickable {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    transition: background-color 0.2s;
}

.user-key-clickable:hover {
    background-color: rgba(25, 135, 84, 0.12);
}

.key-card-header .btn-light {
    background-color: #fff;
    border-color: #fff;
    color: #dc3545;
    font-weight: 500;
}

.key-card-header .btn-light:hover {
    background-color: #f8f9fa;
    color: #dc3545;
}

/* Generate Page */
.generate-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.generate-card-header {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: #28a745;
}

/* Referral Page */
.referral-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.referral-card-header {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.status-used {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-expired {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

/* Settings Page */
.settings-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.settings-card-header {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.settings-card-body {
    padding: 20px;
}

.btn-custom {
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-custom:hover {
    opacity: 0.9;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.15rem;
    color: #777;
    z-index: 5;
}

.toggle-password:hover {
    color: #333;
}

/* Auth Pages (Login, Register, Reset Device) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 20px 10px;
}

.auth-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 28px 24px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-card h3 {
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

.auth-card .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.auth-card .form-control {
    border-radius: 5px;
    padding: 10px 12px;
    border: 1px solid #ddd;
}

.auth-card .icon-container {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
}

.additional-links {
    font-size: 0.9rem;
}

.additional-links a:not(.btn) {
    color: #007bff;
    text-decoration: none;
}

.additional-links a:not(.btn):hover {
    text-decoration: underline;
}

/* Owner Functions Page */
.owner-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.owner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.owner-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.owner-card-body {
    padding: 30px;
    text-align: center;
}

.owner-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.owner-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.owner-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    text-decoration: none;
    transform: scale(1.03);
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 36px 0;
    margin-bottom: 36px;
    border-radius: 0 0 30px 30px;
}

.feature-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.6;
}
