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

:root {
    --primary: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary: #00cec9;
    --accent: #fdcb6e;
    --danger: #e17055;
    --success: #00b894;
    --dark: #2d3436;
    --light: #dfe6e9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Header */
.header {
    background: var(--gradient);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    font-size: 32px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance-card {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.balance-card i {
    font-size: 24px;
    color: var(--accent);
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-info .label {
    font-size: 12px;
    opacity: 0.9;
}

.balance-info .amount {
    font-size: 20px;
    font-weight: bold;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1);
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: var(--white);
    padding: 0 20px;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.tab-btn {
    padding: 15px 25px;
    border: none;
    background: none;
    color: #636e72;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-size: 24px;
}

.section-header h2 i {
    color: var(--primary);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--light);
    background: var(--white);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.offer-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.offer-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.offer-badge.hot {
    background: var(--danger);
    color: var(--white);
    animation: pulse 2s infinite;
}

.offer-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--white);
}

.offer-content {
    padding: 20px;
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.offer-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 5px;
}

.offer-category {
    font-size: 12px;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.offer-reward {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.offer-description {
    color: #636e72;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--light);
}

.offer-difficulty {
    display: flex;
    gap: 3px;
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    background: var(--light);
    border-radius: 50%;
}

.difficulty-dot.active {
    background: var(--success);
}

.offer-time {
    font-size: 12px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Surveys List */
.surveys-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.survey-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.survey-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.survey-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    flex-shrink: 0;
}

.survey-info {
    flex: 1;
}

.survey-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.survey-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #636e72;
}

.survey-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.survey-reward {
    text-align: right;
}

.survey-reward .amount {
    font-size: 20px;
    font-weight: bold;
    color: var(--success);
}

.survey-reward .label {
    font-size: 12px;
    color: #636e72;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px);
}

.video-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.video-card:hover {
    transform: scale(1.02);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 140px;
    background: linear-gradient(45deg, #2d3436, #636e72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail i {
    font-size: 40px;
    color: var(--white);
    opacity: 0.8;
    transition: all 0.3s;
}

.video-card:hover .video-thumbnail i {
    opacity: 1;
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
}

.video-details {
    padding: 15px;
}

.video-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.video-reward {
    color: var(--success);
    font-size: 13px;
    font-weight: bold;
}

/* History */
.history-list {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.history-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light);
    transition: background 0.3s;
}

.history-item:hover {
    background: #f8f9fa;
}

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

.history-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.history-icon.credit {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.history-icon.debit {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.history-details {
    flex: 1;
}

.history-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.history-date {
    font-size: 12px;
    color: #636e72;
}

.history-amount {
    font-weight: bold;
    font-size: 16px;
}

.history-amount.credit {
    color: var(--success);
}

.history-amount.debit {
    color: var(--danger);
}

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

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--dark);
    z-index: 10;
    transition: all 0.3s;
}

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

.modal-header {
    position: relative;
}

.modal-header img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.modal-title-section {
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: var(--white);
}

.modal-title-section h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.modal-body {
    padding: 25px;
}

.modal-body h3 {
    margin: 20px 0 10px 0;
    color: var(--dark);
    font-size: 16px;
}

.description {
    color: #636e72;
    line-height: 1.6;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #636e72;
}

.instructions li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--success);
}

.terms {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-size: 13px;
    color: #636e72;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--light);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

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

/* Video Modal Specific */
.video-modal {
    max-width: 800px;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s linear;
}

#timerText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: bold;
}

.video-info {
    padding: 20px;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .survey-card {
        flex-direction: column;
        text-align: center;
    }

    .survey-reward {
        text-align: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark);
}