/* IPTV Streaming Platform - Main Stylesheet */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --sidebar-bg: #111827;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-bg);
}

/* Navigation */
.navbar {
    background: var(--sidebar-bg);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 1rem;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 4rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Features */
.features {
    background: white;
}

.features-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.features-content li {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    list-style: none;
}

/* Plans */
.plans {
    background: var(--light-bg);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plan-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--text-primary);
}

.plan-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.plan-price .period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.plan-features {
    margin: 1.5rem 0;
    white-space: pre-line;
    color: var(--text-secondary);
}

/* Knowledge Base */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.knowledge-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.knowledge-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--sidebar-bg);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group .editor {
    min-height: 200px;
    font-family: monospace;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Admin/User Panel Layout */
.admin-layout,
.user-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2,
.sidebar-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.user-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.email-status.verified {
    color: var(--secondary-color);
}

.email-status.unverified {
    color: var(--warning-color);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.sidebar-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.top-bar h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-bell .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.stat-icon.users {
    background: #dbeafe;
    color: #1e40af;
}

.stat-icon.subscriptions {
    background: #d1fae5;
    color: #065f46;
}

.stat-icon.payments {
    background: #fef3c7;
    color: #92400e;
}

.stat-icon.tickets {
    background: #fee2e2;
    color: #991b1b;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-primary);
}

.table tr:hover {
    background: var(--light-bg);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active,
.status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive,
.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.pending,
.status-badge.open {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.expired,
.status-badge.closed {
    background: #f3f4f6;
    color: #6b7280;
}

.status-badge.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 700px;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.detail-item {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.detail-item span {
    color: var(--text-primary);
}

/* Payment Details */
.payment-details {
    margin: 2rem 0;
}

.screenshot-section,
.approved-info,
.rejected-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.screenshot {
    max-width: 100%;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Stream Section */
.stream-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.stream-keys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.key-box {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
}

.key-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.key-value {
    display: flex;
    gap: 0.5rem;
}

.key-value input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: white;
}

.expiry-info {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Subscription Status */
.subscription-status {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.status-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.status-card.active {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.status-card.pending {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.status-card.expired {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

/* Notifications */
.notifications-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.notification-list {
    margin-top: 1rem;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.notification-item small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Ticket View */
.ticket-view {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ticket-info {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.ticket-messages {
    margin: 1.5rem 0;
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.message.user {
    background: #dbeafe;
    margin-left: 2rem;
}

.message.admin {
    background: #d1fae5;
    margin-right: 2rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-header strong {
    color: var(--text-primary);
}

.message-header span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.message-content {
    color: var(--text-primary);
}

.attachment-link {
    color: var(--primary-color);
    text-decoration: none;
}

.ticket-reply {
    margin-top: 1.5rem;
}

/* Profile */
.profile-sections {
    display: grid;
    gap: 2rem;
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-large .avatar-placeholder {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

/* Settings */
.settings-container {
    max-width: 800px;
}

.settings-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.info-box {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box .warning {
    color: var(--warning-color);
    font-weight: 600;
}

/* Landing Page Sections */
.landing-sections {
    display: grid;
    gap: 2rem;
}

.section-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Gateways Grid */
.gateways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gateway-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.gateway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.gateway-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Plans Grid Admin */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.plan-card-admin {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.plan-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search Bar */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-bar form {
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text-primary);
}

.pagination a:hover {
    background: var(--light-bg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* No Subscription */
.no-subscription {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.no-subscription h2 {
    margin-bottom: 0.5rem;
}

.no-subscription p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Pending Message */
.pending-message {
    text-align: center;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 0.375rem;
    color: #92400e;
}

/* Payment Gateways in User Panel */
.payment-gateways {
    margin: 1.5rem 0;
}

.payment-gateways h3 {
    margin-bottom: 1rem;
}

.gateway-option {
    display: block;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.gateway-option:hover {
    border-color: var(--primary-color);
}

.gateway-option input {
    margin-right: 0.5rem;
}

.gateway-option small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-open {
    overflow: hidden;
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gateways-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar .container {
        position: relative;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--sidebar-bg);
        padding: 1rem;
        gap: 0;
        z-index: 100;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .sidebar.active {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-grid,
    .gateways-grid,
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    
    .stream-keys {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .message.user,
    .message.admin {
        margin-left: 0;
        margin-right: 0;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .filter-buttons .btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .plan-actions,
    .gateway-actions,
    .form-actions {
        flex-direction: column;
    }
    
    .plan-actions button,
    .gateway-actions button,
    .form-actions .btn {
        width: 100%;
    }
    
    /* Responsive Tables */
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .table thead,
    .table tbody,
    .table tr,
    .table th,
    .table td {
        display: block;
    }
    
    .table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 0.375rem;
        padding: 1rem;
    }
    
    .table td {
        border: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding-left: 50%;
        text-align: left;
        white-space: normal;
    }
    
    .table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 1rem;
        font-weight: 600;
        text-align: left;
    }
    
    .table td:last-child {
        border-bottom: none;
    }
    
    /* Modal on Mobile */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-large {
        max-width: 95%;
    }
    
    /* Forms on Mobile */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Auth Cards */
    .auth-card {
        padding: 1.5rem;
    }
    
    /* Profile Sections */
    .profile-sections {
        grid-template-columns: 1fr;
    }
    
    /* Landing Page Sections */
    .landing-sections {
        grid-template-columns: 1fr;
    }
    
    /* Settings */
    .settings-container {
        max-width: 100%;
    }
    
    /* Search Bar */
    .search-bar form {
        flex-direction: column;
    }
    
    .search-bar input,
    .search-bar button {
        width: 100%;
    }
    
    /* Pagination */
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination a {
        width: 100%;
        text-align: center;
    }
    
    /* Status Cards */
    .status-card {
        padding: 1rem;
    }
    
    /* Notification Bell */
    .notification-bell {
        position: static;
    }
    
    /* Empty States */
    .empty-state,
    .no-subscription {
        padding: 2rem 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .plan-card,
    .plan-card-admin,
    .gateway-card,
    .knowledge-card,
    .dashboard-card,
    .profile-card {
        padding: 1rem;
    }
    
    .plan-price {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-nav a {
        padding: 0.75rem 1rem;
    }
    
    .sidebar-footer {
        padding: 1rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .top-bar h1 {
        font-size: 1.25rem;
    }
    
    .section-card,
    .settings-section {
        padding: 1rem;
    }
}
