/*
 * Created Date: Wednesday, 6th August 2025, 3:12:12 am
 * Author: Kingsley Chimezie (KCPC7)
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(-45deg, #667eea 0%, #764ba2, #e73c7e, #23a6d5);
    background-size: 600% 600%;
    animation: gradient 22s ease infinite;
    
    min-height: 100vh;
    color: #333;
}
@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
}

.info-icon {
    cursor: help;
    display: inline-block;
    margin-left: 5px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.info-icon:hover {
    opacity: 1;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    margin-top: 50px;
    left: 50%;
    transform: translateX(-50%);
    transform: translateY(50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    max-width: 300px;
    z-index: 10000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: normal;
    bottom: 100%;
    margin-bottom: 10px;
}

.upload-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.file-upload {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.upload-box {
    flex: 1;
    min-width: 250px;
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-box:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-box.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-box input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #667eea;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.upload-subtext {
    font-size: 0.9rem;
    color: #666;
}

.analyse-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto 0;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.analyse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.analyse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-section {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-list {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid #eee;
}

.user-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
}

.user-item:hover {
    background: #f8f9ff;
}

.user-item:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.2rem;
}

.user-info {
    flex: 1;
}

.username {
    font-weight: 600;
    margin-bottom: 2px;
}

.user-link {
    font-size: 0.9rem;
    color: #667eea;
    text-decoration: none;
}

.user-link:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border: 1px solid #fcc;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.help-btn,
.download-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
    text-decoration: none;
    display: inline-block;
}

.help-btn:hover,
.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.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);
    overflow-y: auto;
    /* Add this */
    -webkit-overflow-scrolling: touch;
    /* Add this for iOS */
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    /* Add this */
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    position: absolute;
    right: 25px;
    top: 25px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 15px;
    background: #f8f9fa;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.steps-list {
    list-style: none;
    padding: 0;
}

.steps-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
}

.steps-list li:last-child {
    border-bottom: none;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.footer {
    margin-top: 50px;
    padding: 40px 20px 20px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    text-align: center;
    color: white;
}

.footer-content {
    margin-bottom: 20px;
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.kccLink {
    color: rgba(255, 166, 0, 0.726);
    font-weight: bold;
    text-decoration: none;
}

.kccLink:hover {
    color: rgba(255, 166, 0, 1);
    text-decoration: underline;
}

.support-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-text {
    margin-bottom: 15px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.donate-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #00a085 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 16px rgba(0, 212, 170, 0.3);
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 212, 170, 0.4);
}

.mobile-ad {
    display: none;
}

.google-ad-container {
    width: 100%;
    margin: 20px 0;
    min-height: 100px;
    height: 120px;  /* Set fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);  /* Lighter background */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.grouped-ad-container {
    width: 100%;
    padding: 15px 15px;
    margin: 20px 0;
    min-height: 100px;
    height: auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    /* background: rgba(255, 255, 255, 0.2); */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.ad-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 0.9rem;
    padding: 1rem;
    width: 100%;
    cursor: pointer; /* Add cursor pointer */
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .help-btn,
    .download-btn {
        margin: 5px 10px;
        width: 80%;
        max-width: 300px;
    }
    .mobile-ad {
        display: block;
    }
    .desktop-ad {
        display: none;
    }
}