/* ===========================
   GSHIT Downloads CSS - Organized
   =========================== */

/* ===========================
   Base Layout
   =========================== */
.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.center h2 {
    font-size: 2rem;
    color: #003366;
    margin-bottom: 1rem;
}

/* ===========================
   Typography & Text
   =========================== */
.bucket_title {
    background: linear-gradient(to right, #003366, #336699);
    padding: 1.5rem;
    border-radius: 16px;
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    width: 80%;
    margin: 2rem auto 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    letter-spacing: 1px;
}

.p {
    text-align: center;
    font-size: 1.2rem;
    padding: 0.5rem;
    margin: auto;
    width: fit-content;
    color: rgba(254, 2, 2, 0.744);
}

.notice {
    font-size: 0.95rem;
    color: #444;
    max-width: 600px;
    margin-top: 1rem;
    line-height: 1.5;
    text-align: justify;
}

.time {
    font-size: 10px;
    color: dodgerblue;
    margin-left: 10px;
    font-style: italic;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-block;
    width: 100px;
}

/* ===========================
   Service Status Components
   =========================== */
.status-indicator {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.status-light {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.light-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.light-circle.green {
    background-color: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

.light-circle.red {
    background-color: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

.light-circle.yellow {
    background-color: #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.6);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.success .status-dot { background-color: #28a745; }
.status-indicator.error .status-dot { background-color: #dc3545; }
.status-indicator.processing .status-dot {
    background-color: #ffc107;
    animation: pulse 1.5s infinite;
}

/* ===========================
   Progress Bars
   =========================== */
.daily-limit {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-container {
    width: 100%;
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar.processing {
    height: 100%;
    background: linear-gradient(45deg, #007cba, #0056b3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    animation: shimmer 2s infinite linear;
}

/* ===========================
   Forms & Inputs
   =========================== */
form {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

form label {
    font-weight: 600;
    color: #003366;
    font-size: 1.1rem;
}

form input[type="number"] {
    padding: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

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

.remaining-info {
    color: #6c757d;
}

.limit-reached {
    color: #dc3545;
    font-weight: bold;
}

/* ===========================
   Buttons
   =========================== */
.submit-btn, form button, .nav-button, .download-btn, .back-btn, .retry-btn {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 1.5rem auto 0;
    text-decoration: none;
}

.submit-btn:hover:not(:disabled), form button:hover:not(:disabled),
.nav-button:hover, .download-btn:hover, .back-btn:hover, .retry-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.submit-btn:disabled, form button:disabled,
.download-btn.disabled, .disabled-btn {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #6c757d;
}

.download-btn {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    margin: 0 0.5rem;
}

.download-btn:hover {
    background: #0056b3;
}

.back-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #5a6268;
}

.retry-btn {
    background: #dc3545;
}

.retry-btn:hover {
    background: #c82333;
}

/* ===========================
   Project List
   =========================== */
.projects-container {
    max-width: 900px;
    margin: 2em auto;
    padding: 0 1em;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
}

.project-card {
    background: #fff;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    margin-bottom: 1.5em;
    padding: 1.5em 2em;
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(26,127,208,0.13);
}

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

.project-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #1a7fd0;
    margin-bottom: 0.3em;
}

.project-details {
    font-size: 0.98rem;
    color: #444;
    margin-bottom: 0.7em;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.status-pill {
    display: inline-block;
    padding: 0.3em 0.9em;
    font-size: 0.98rem;
    border-radius: 12px;
    font-weight: bold;
    margin-right: 0.7em;
}

.status-complete { background: #e6f9e7; color: #1cad56; }
.status-failed { background: #fbe6e6; color: #d9323c; }
.status-processing { background: #e6f0fb; color: #1a7fd0; }

.info-message {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 2em;
    text-align: center;
    color: #333;
    margin-top: 3em;
}

.info-message h2 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5em;
}
.info-message p {
    font-size: 1rem;
    color: #555;
}

.refresh-note {
    text-align: center;
    color: #888;
    margin-top: 2em;
    font-size: 0.95rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ===========================
   Loader & Modals
   =========================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader-content {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.spinLogo {
    animation: spin 2s linear infinite;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
}

.progress-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #007cba;
    animation: bounce 1.4s infinite ease-in-out both;
}

.progress-dots span:nth-child(1) { animation-delay: -0.32s; }
.progress-dots span:nth-child(2) { animation-delay: -0.16s; }

/* ===========================
   Error Handling
   =========================== */
.error-container {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #721c24;
}

.error-details {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #dc3545;
    overflow-x: auto;
}

/* ===========================
   Recent Activity
   =========================== */
.recent-activity {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.recent-activity h3 {
    margin-top: 0;
    color: #495057;
}

.activity-list {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

/* ===========================
   Utility Classes
   =========================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state a {
    color: #007bff;
    text-decoration: none;
}

.auto-refresh-note {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
}

.view-all-link {
    display: inline-block;
    margin-top: 15px;
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* ===========================
   Animations
   =========================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 700px) {
    .projects-container, .bucket_title {
        width: 90%;
        padding-left: 0;
        padding-right: 0;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .project-card {
        padding: 1em;
        margin-bottom: 1em;
    }

    .project-header {
        flex-direction: column;
        gap: 8px;
    }

    .info-message {
        padding: 1em;
        margin-top: 1em;
    }
}

