/* Monetization Features Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.admin-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #fe2c55;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature-section {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.feature-card {
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 44, 85, 0.2);
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.feature-info {
    flex: 1;
}

.feature-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.feature-info p {
    color: #888;
    font-size: 0.85rem;
    line-height: 1.4;
}

.feature-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 0;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    margin: 15px 0;
}

.feature-stats span {
    color: #aaa;
    font-size: 0.85rem;
}

.feature-stats strong {
    color: #fe2c55;
    font-weight: 600;
}

.config-btn {
    width: 100%;
    padding: 10px;
    background: #fe2c55;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.config-btn:hover {
    background: #e02849;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #fe2c55;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Analytics Section */
.analytics-section {
    margin-top: 40px;
    padding: 30px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.analytics-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #fe2c55;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.chart-container {
    background: #0f0f0f;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
}

.chart-container h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.chart-container canvas {
    max-height: 300px;
}

/* Activity Log */
.activity-log {
    margin-top: 40px;
    padding: 30px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.activity-log h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fe2c55;
}

.log-container {
    max-height: 400px;
    overflow-y: auto;
}

.log-entry {
    padding: 15px;
    background: #0f0f0f;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #fe2c55;
}

.log-entry .timestamp {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.log-entry .action {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.log-entry .user {
    color: #aaa;
    font-size: 0.85rem;
}

.loading {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fe2c55;
}

#modal-title {
    margin-bottom: 20px;
    color: #fe2c55;
}

#modal-body {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #fe2c55;
}

.form-group .help-text {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.cancel-btn,
.save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background: #333;
    color: #fff;
}

.cancel-btn:hover {
    background: #444;
}

.save-btn {
    background: #fe2c55;
    color: #fff;
}

.save-btn:hover {
    background: #e02849;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 1.8rem;
    }

    .header-stats {
        flex-direction: column;
        gap: 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .feature-header {
        flex-direction: column;
        align-items: stretch;
    }

    .toggle-switch {
        align-self: flex-end;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Scrollbar Styling */
.log-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-radius: 10px;
}

.log-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #fe2c55;
    border-radius: 10px;
}

.log-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #e02849;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #333;
    border-top: 4px solid #fe2c55;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
