/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2937;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --border-color: #30363d;
    --success-color: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Navigation */
.report-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.875rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Report Content */
.report-content {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s ease;
}

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

/* Markdown Styling */
.report-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.report-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.report-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.report-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.report-content ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.report-content li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.report-content li:last-child {
    border-bottom: none;
}

.report-content a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.report-content a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Share Section */
.share-section {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.share-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.linkedin:hover {
    background: #006399;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn.copy {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn.copy:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* Footer Info */
.footer-info {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.footer-info a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.last-updated {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .report-nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .report-content {
        padding: 1.5rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
    }
}

/* Light mode support (optional) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #f6f8fa;
        --bg-tertiary: #e5e7eb;
        --text-primary: #1f2937;
        --text-secondary: #6b7280;
        --border-color: #d1d5db;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in;
}

.share-modal {
    background: var(--bg-secondary);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.share-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

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

.share-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.share-modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.share-modal-body textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
}

.share-modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.share-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.share-preview strong {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.share-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-primary);
}

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

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

/* Responsive Modal */
@media (max-width: 768px) {
    .share-modal {
        width: 95%;
        max-height: 95vh;
    }

    .share-modal-header h3 {
        font-size: 1.25rem;
    }

    .share-modal-body {
        max-height: calc(95vh - 200px);
    }

    .share-modal-footer {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Team Dashboard */
.team-dashboard {
    background: var(--background-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.team-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #4040ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 85, 255, 0.3);
}

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

.team-result {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}
/* Rate Limit Display */
.rate-limit-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.rate-limit-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
}

.rate-limit-icon {
    font-size: 20px;
}

.rate-limit-text {
    flex: 1;
    font-weight: 500;
}

.rate-limit-text .rate-limit-remaining {
    font-weight: 700;
    font-size: 16px;
}

.rate-limit-text .rate-limit-reset {
    opacity: 0.9;
    font-size: 13px;
}

.refresh-rate-limit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.refresh-rate-limit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.rate-limit-display.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.rate-limit-display.danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.cache-status {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.2);
}

.cache-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
}

.cache-icon {
    font-size: 18px;
}

.cache-status-text {
    flex: 1;
}

.clear-cache-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.clear-cache-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.cache-status.empty {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}
