:root {
    --primary-color: #FFC107;
    --primary-light: #FFD54F;
    --primary-dark: #FFA000;
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --card-bg: #252525;
    --card-hover: #2E2E2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-tertiary: #757575;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
}

/* Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.earnings {
    text-align: right;
    background: rgba(255, 193, 7, 0.05);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.earnings p {
    margin: 0.25rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

#totalEarnings {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.target {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

/* Tasks Section */
.tasks-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tasks-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.task-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--box-shadow);
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 193, 7, 0.2);
}

.task-card.watched {
    opacity: 0.6;
    cursor: not-allowed;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-card.watched .task-icon {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.task-amount {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

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

.pagination button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.pagination button:not(:disabled):hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.earnings {
    text-align: right;
}

.earnings p {
    margin: 5px 0;
    font-size: 1.1rem;
}

#totalEarnings {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3rem;
}

.tasks-header {
    margin-bottom: 20px;
}

.tasks-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.tasks-container {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.task-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.task-amount {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background-color: var(--primary-color);
    color: #000;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(20px);
    animation: slideUp 0.3s ease-out forwards;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.timer {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    transition: width 1s linear;
}

/* Success Modal */
.success {
    text-align: center;
    padding: 3rem 2rem;
}

.success h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.5rem;
}

.success p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.earned-amount {
    color: var(--primary-color) !important;
    font-size: 1.5rem !important;
    font-weight: 700;
    margin: 0 0.25rem;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success h2 {
    color: var(--success-color);
    margin-bottom: 15px;
}

.earned-amount {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

#closeSuccess {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 30px;
    margin-top: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

#closeSuccess:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

#closeSuccess:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

/* Video Player */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Timer */
.timer {
    margin: 1.5rem 0 0;
    text-align: center;
}

.timer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

#timeRemaining {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 1s linear;
    border-radius: 4px;
}

/* Close Button */
.close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Success Icon */
.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 3.5rem;
    color: var(--success-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 1.5rem 1.25rem;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .earnings {
        text-align: center;
        width: 100%;
    }
    
    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 1.75rem 1.5rem;
    }
    
    .success {
        padding: 2rem 1.5rem;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
    }
    
    .success-icon i {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .tasks-container {
        grid-template-columns: 1fr;
    }
    
    .task-card {
        padding: 1.25rem;
    }
    
    .modal-content {
        padding: 1.5rem 1.25rem;
    }
    
    .success h2 {
        font-size: 1.75rem;
    }
    
    .earned-amount {
        font-size: 1.3rem !important;
    }
}

/* Task Card Styles */
.task-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.task-card:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.task-card.watched {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.03);
}

.task-card.watched:hover {
    transform: none;
    box-shadow: none;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
}

.task-card.watched .task-icon {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.task-amount {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.task-amount .earn-amount {
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: var(--transition);
}

.task-amount .completed-badge {
    color: var(--success-color);
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-amount .completed-badge::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .earnings {
        text-align: center;
    }
    
    .task-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .task-info {
        width: 100%;
        justify-content: center;
    }
}
