/* Custom Reset and Variables */
:root {
    --bg-main: #0b0f19;
    --bg-header: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --bg-card: rgba(22, 30, 49, 0.7);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #3b82f6; /* Blue */
    --color-primary-hover: #2563eb;
    --color-primary-glow: rgba(59, 130, 246, 0.35);
    
    --color-feature: #10b981; /* Emerald */
    --color-announcement: #f59e0b; /* Amber */
    --color-issue: #ef4444; /* Rose */
    --color-deprecated: #f97316; /* Orange */
    --color-general: #8b5cf6; /* Violet */
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
    border: 2px solid #0f172a;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--bg-header);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 24px 32px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.app-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gcp-logo-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gcp-logo {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.last-updated-label {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px var(--color-primary-glow);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--color-primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-card-hover);
}

.refresh-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: var(--transition-smooth);
}

.refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.refresh-button:active {
    transform: translateY(0);
}

.refresh-button i {
    font-size: 16px;
    transition: transform 0.5s ease;
}

.refresh-button.spinning i {
    animation: rotate 1s linear infinite;
}

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

/* Dashboard Section */
.dashboard-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stats Metrics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-card-hover);
    box-shadow: var(--shadow-lg);
}

.stat-icon-wrapper {
    background: rgba(255, 255, 255, 0.04);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card.total .stat-icon-wrapper { color: var(--color-primary); background: rgba(59, 130, 246, 0.08); }
.stat-card.features .stat-icon-wrapper { color: var(--color-feature); background: rgba(16, 185, 129, 0.08); }
.stat-card.issues .stat-icon-wrapper { color: var(--color-issue); background: rgba(239, 68, 68, 0.08); }
.stat-card.announcements .stat-icon-wrapper { color: var(--color-announcement); background: rgba(245, 158, 11, 0.08); }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Control Panel */
.control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

#search-input {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: var(--transition-smooth);
}

#search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: rgba(15, 23, 42, 0.9);
}

.search-clear-button {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-button:hover {
    color: white;
}

.filter-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-card-hover);
    color: white;
}

.filter-pill.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

.filter-pill.active .badge {
    background: var(--color-primary);
    color: white;
}

/* Warnings Banners */
.banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 4px;
}

.warning-banner {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbd38d;
}

.banner-close-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
}

/* Feed Content */
.feed-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.5s ease-out backwards;
}

.date-header {
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-main);
    padding: 10px 0;
    margin-top: 10px;
}

.date-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: 16px;
    white-space: nowrap;
}

.date-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

/* Release Update Card */
.update-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.update-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-card-hover);
    box-shadow: var(--shadow-md), 0 0 15px rgba(255, 255, 255, 0.02);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.type-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.type-pill.feature {
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-feature);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.type-pill.announcement {
    background: rgba(245, 158, 11, 0.08);
    color: var(--color-announcement);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.type-pill.issue {
    background: rgba(239, 68, 68, 0.08);
    color: var(--color-issue);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.type-pill.deprecated {
    background: rgba(249, 115, 22, 0.08);
    color: var(--color-deprecated);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.type-pill.general {
    background: rgba(139, 92, 246, 0.08);
    color: var(--color-general);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.card-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: var(--border-card-hover);
}

.card-btn.tweet-btn {
    background: rgba(29, 155, 240, 0.08);
    color: #1d9bf0;
    border-color: rgba(29, 155, 240, 0.2);
}

.card-btn.tweet-btn:hover {
    background: #1d9bf0;
    color: white;
    border-color: #1d9bf0;
    box-shadow: 0 2px 10px rgba(29, 155, 240, 0.25);
}

/* Card Body Styles (Markdown HTML) */
.card-body {
    color: var(--text-secondary);
    font-size: 15px;
}

.card-body p {
    margin-bottom: 12px;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.card-body a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(59, 130, 246, 0.4);
    transition: var(--transition-smooth);
}

.card-body a:hover {
    color: #60a5fa;
    border-bottom-style: solid;
}

.card-body code {
    background-color: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-body ul, .card-body ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.card-body li {
    margin-bottom: 6px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.empty-icon-wrapper {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Skeleton Loading Animation */
.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.skeleton-date-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-date-bar {
    width: 150px;
    height: 24px;
    background: linear-gradient(90deg, #161e31 25%, #222e47 50%, #161e31 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-card {
    height: 160px;
    background: linear-gradient(90deg, #161e31 25%, #222e47 50%, #161e31 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 16px;
    border: 1px solid var(--border-card);
}

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

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

/* Footer Section */
.app-footer-nav {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-card);
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.app-footer-nav a:hover {
    color: var(--color-primary);
}

/* Tweet Modal Style Sheets */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: #151820;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
}

.modal-user-handle {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.modal-close-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.modal-body {
    padding: 24px;
}

#tweet-textarea {
    width: 100%;
    background: transparent;
    border: none;
    resize: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    outline: none;
    line-height: 1.5;
}

.tweet-preview-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #93c5fd;
}

.tweet-preview-notice i {
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #11131a;
}

.tweet-char-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

.progress-ring__circle-bg {
    stroke: rgba(255, 255, 255, 0.04);
}

#tweet-counter-text {
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .filter-wrapper {
        justify-content: center;
    }
    .filter-pill {
        flex-grow: 1;
        justify-content: center;
    }
}
