/* Inter Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* THE INFINITY DESIGN TOKENS */
  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Modern Deep Colors */
  --bg-dark-900: #020617; /* Very dark slate, almost black */
  --bg-dark-800: #0f172a; /* Slate 900 */
  --bg-dark-700: #1e293b; /* Slate 800 (Panel BG) */
  --bg-dark-600: #334155; /* Slate 700 (Borders) */
  
  --accent-primary: #3b82f6; /* Blue 500 */
  --accent-glow: rgba(59, 130, 246, 0.4);
  
  --text-white: #f8fafc;
  --text-gray-300: #cbd5e1;
  --text-gray-400: #94a3b8;
  
  --panel-radius: 16px;
  --panel-bg: rgba(30, 41, 59, 0.65); /* Glassy Slate */
  --panel-border: rgba(148, 163, 184, 0.1);
}

/* GLOBAL RESET & BASE */
* {
    box-sizing: border-box;
}

body {
  font-family: var(--font-inter) !important;
  background-color: var(--bg-dark-900) !important;
  /* Add a subtle ambient background gradient */
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
  background-attachment: fixed;
  color: var(--text-white) !important;
  margin: 0;
  padding-top: 0 !important; /* Reset layout */
}

/* ---------------------------------------------------- */
/* TOP NAVIGATION PANEL (HEADER) BEAUTIFICATION */
/* ---------------------------------------------------- */
header {
    background: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 40px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

/* Header Links / Navigation */
header a {
    color: var(--text-gray-300) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    margin-right: 20px;
}
header a:hover {
    color: white !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Push content down so it's not hidden behind fixed header */
.container, main, .content {
    padding-top: 90px !important;
}

/* ---------------------------------------------------- */
/* GLANCE PANEL (WIDGET) STYLES */
/* ---------------------------------------------------- */

/* Card Container */
.widget-content:not(.widget-content-frameless), .widget-content-frame {
    background: var(--panel-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    
    border: 1px solid var(--panel-border) !important;
    border-radius: var(--panel-radius) !important;
    padding: 24px !important;
    
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease !important;
}

/* Card Hover Effect - "Pop" */
.widget-content:not(.widget-content-frameless):hover, .widget-content-frame:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 
                0 10px 10px -5px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important; /* Blue border glow */
}

/* Titles inside widgets */
.widget-title, h3 {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--text-white) !important;
    margin-bottom: 16px !important;
    display: flex;
    align-items: center;
    letter-spacing: -0.02em;
    text-transform: none !important;
}

/* Add a little decorative accent to titles (optional) */
.widget-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    margin-right: 12px;
    border-radius: 4px;
}

/* Text Content */
.widget-text, p, li, span {
    color: var(--text-gray-300) !important;
    line-height: 1.6 !important;
}

/* Specific Widget Tweaks */

/* RSS Feed Items */
.feed-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 12px 0;
}
.feed-item:last-child {
    border-bottom: none;
}
.feed-item-title {
    font-weight: 500 !important;
    color: var(--text-white) !important;
    margin-bottom: 4px;
    display: block;
    text-decoration: none !important;
}
.feed-item-title:hover {
    color: var(--accent-primary) !important;
}
.feed-item-meta {
    font-size: 0.8rem;
    color: var(--text-gray-400) !important;
}

/* Calendar Widget */
.calendar-day-header {
    color: var(--text-gray-400) !important;
    font-size: 0.85rem;
    font-weight: 600;
}
.calendar-day-current {
    background: var(--accent-primary) !important;
    color: white !important;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ---------------------------------------------------- */
/* UI ELEMENTS */
/* ---------------------------------------------------- */

/* Links */
a {
    color: var(--text-gray-300);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--accent-primary);
}

/* ---------------------------------------------------- */
/* UNIFIED BUTTON STYLING (THE INFINITY STANDARD) */
/* ---------------------------------------------------- */

button, .button, .expand-toggle-button, input[type="button"], input[type="submit"] {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    
    color: var(--text-gray-400) !important;
    font-family: var(--font-inter) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    
    letter-spacing: 0.05em !important;
    
    padding: 10px 20px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.2 !important;
}

/* Hover State - Blue Glow/Lift */
button:hover, .button:hover, .expand-toggle-button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    color: var(--accent-primary) !important; /* Make text blue/white */
    
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Active/Focus State */
button:active, .button:active, .expand-toggle-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Specific Style Overrides for Expand Button (Layout Only) */
.expand-toggle-button {
    width: 100% !important;
    margin-top: 15px !important;
}

/* Inputs */
input[type="text"], input[type="search"] {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    outline: none !important;
    transition: border-color 0.2s;
}
input[type="text"]:focus, input[type="search"]:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Horizontal Rule / Separators */
hr, .separator {
    border-color: rgba(255,255,255,0.08) !important;
}

/* Icon (Arrow) Styling for Expand Button */
.expand-toggle-button-icon {
    display: block !important;
    width: 6px !important;
    height: 6px !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: rotate(45deg) !important;
    transition: transform 0.3s ease !important;
    margin-bottom: 2px !important;
}

/* Icon State when Expanded */
.expand-toggle-button.container-expanded .expand-toggle-button-icon {
    transform: rotate(-135deg) !important;
    margin-bottom: -2px !important;
}
/* Calendar Widget */
.calendar-day-header {
    color: var(--text-gray-400) !important;
    font-size: 0.85rem;
    font-weight: 600;
}
.calendar-day-current {
    background: var(--accent-primary) !important;
    color: white !important;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Calendar Navigation Arrows */
.calendar-nav-button {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-gray-400) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    width: auto !important; /* Ensure width allows content */
    min-width: 32px;
    height: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav-button:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
/* Calendar Navigation Arrows */
.calendar-nav-button {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-gray-400) !important;
    border-radius: 6px !important;
    padding: 0 !important; /* Reset padding */
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem; /* Size for the icon text */
    line-height: 1;
}

/* Previous Button Icon */
.calendar-header > button:nth-of-type(1)::after {
    content: '‹'; /* Left single guillemet */
    display: block;
    font-family: serif; /* Ensure it looks like an arrow */
    margin-top: -3px; /* visual center fix */
}

/* Next Button Icon */
.calendar-header > button:nth-of-type(2)::after {
    content: '›'; /* Right single guillemet */
    display: block;
    font-family: serif;
    margin-top: -3px;
}

.calendar-nav-button:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Custom Visited Link Styling - Infinity Theme Friendly */
a:visited,
.color-primary-if-not-visited:visited,
a.color-primary-if-not-visited:visited {
    color: #8b5cf6 !important; /* Violet 500 */
    text-decoration-color: rgba(139, 92, 246, 0.4);
}


/* Fix Vertical Spacing between Secondary Nav and Widgets */
.mobile-navigation {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important; /* seamless look */
}

/* Reduce padding inside the secondary nav container */
.mobile-navigation-page-links {
    padding-top: 0.5rem !important;
    padding-bottom: 0 !important;
}

/* Reduce the top padding of the main widget area */
.page {
    padding-top: 1.5rem !important; /* Reduced from default ~23px + margins */
}

