/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Sections */
.section {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

/* Cards */
.card, .auth-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.auth-card {
    text-align: center;
}

.card h2, .auth-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

.instruction {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Share Button */
.share-section {
    margin: 20px 0;
    text-align: center;
}

.btn-share {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.btn-share:active {
    transform: translateY(0);
}

.share-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-share:hover .share-icon {
    transform: scale(1.1);
}

/* Share button animation */
.btn-share::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-share:hover::before {
    left: 100%;
}

/* Input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #f7fafc;
}

.input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.how-it-works-link {
    text-align: center;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.how-it-works-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 10px;
    background: #fed7d7;
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
}

/* Videos List */
.videos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.video-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-item.completed {
    background: #f0fff4;
    border-color: #48bb78;
    opacity: 0.7;
}

.video-item.completed .video-title {
    text-decoration: line-through;
    color: #68d391;
}

.video-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.video-username {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 8px;
}

.video-url {
    font-size: 0.9rem;
    color: #667eea;
    word-break: break-all;
}

.video-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #48bb78;
    font-weight: 500;
}

/* Progress */
.progress-section {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    font-weight: 500;
    color: #4a5568;
}

/* Success Card */
.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 20px;
    font-weight: bold;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 25px;
}

.modal-instruction {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #2d3748;
}

.checkbox {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-separator {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section:not(.hidden) {
    animation: fadeIn 0.5s ease;
}

/* TikTok Brand Colors */
.tiktok-gradient {
    background: linear-gradient(135deg, #ff0050 0%, #00f2ea 100%);
}

/* Admin Counter */
.admin-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #999;
    z-index: 1000;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Social Media Links */
.social-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.social-separator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 700;
}

/* Promotional Banner */
.promotional-banner {
    margin-top: 30px;
    text-align: center;
}

.banner-text {
    font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    color: #4a5568;
    margin-bottom: 2vw;
    font-weight: 500;
}

.banner-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.banner-link:hover {
    transform: translateY(-2px);
}

.banner-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

/* Responsive banner */
@media (max-width: 480px) {
    .banner-image {
        max-width: 90vw;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .banner-image {
        max-width: 95vw;
    }
}
