@font-face {
    font-family: 'Geist';
    src: url('./fonts/Geist,Rubik/Geist/Geist-VariableFont_wght.ttf');
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding:0;
}

:root {
    --bg: #202125;
    --icon: #e6e6e6;
    --icon-dis: #555860;
    --text: #c8c9cc;
    --h: 30px;
}

html, body {
    height: 100%;
    background: var(--bg);
    font-family: 'Geist';
    overflow: hidden;
}

.topbar {
    background: transparent;
    height: 40px;
    display:flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    user-select:none;
}

.lactions {
    display: flex;
    align-items:center;
    flex-shrink:0;
}

.main {
    display: flex;
    flex-direction:row;
    align-items:center;
    justify-content:center;
    gap:6px;
    flex-grow:1;
}

.ractions {
    display: flex;
    align-items: center;
    gap:6px;
    flex-shrink:0;
}

.pill {
    display: flex;
    align-items:center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding:2px;
    gap:0;
    flex-shrink:0;
    height: var(--h);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

.nav-btn {
    background: none;
    border:none;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color:var(--icon);
    transition: background 0.12s;
    padding:0;
    flex-shrink:0;
}

.pill-div {
    width: 1px;
    height:13px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
    margin: 0 1px;
}

.addr-wpr {
    position: relative;
    display:flex;
    align-items:center;
    flex-grow:1;
    z-index:0;
}

.addr-bar {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius:999px;
    height:var(--h);
    display:flex;
    align-items:center;
    padding: 0 32px;
    cursor:text;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.18s, background 0.18s;
}

.addr-bar:focus-within {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.11);
}

.addr-side {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    background:none;
    border:none;
    padding:0;
    color:var(--icon);
    cursor:pointer;
    transition: color 0.12s;
}

.addr-side.left {
    left:11px;
    pointer-events:none;
}

.addr-side.right {
    right: 10px;
}

.addr-side.right:hover {
    color: #fff;
}

.addr-input {
    flex:1;
    background:none;
    border:none;
    outline:none;
    color:var(--text);
    font-family:'Geist';
    font-size: 13px;
    font-weight:400;
    caret-color: #428ce6;
    min-width:0;
    width:100%;
    transform:translateX(0%);
    transition:transform .55s cubic-bezier(0.25,1,0.25,1);
    will-change: transform;
}

.addr-bar:focus-within .addr-input {
    transform:translateX(0);
}

.addr-bar::placeholder {
    color: var(--icon-dis);
}

.browser-body {
    height: calc(100vh - 90px);
    background: var(--bg);
    overflow: hidden;
    position: relative;
    margin: 5px;
    border-radius: 15px;
}

.new-clock-page {
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist';
    overflow: hidden;
}

#default-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.ntab-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ntab-time {
    font-size: 72px;
    font-weight: 200;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ntab-date {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--muted2);
    text-transform: lowercase;
}

.ntab-weather {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 300;
    color: var(--muted2);
    letter-spacing: 0.04em;
    min-height: 36px;
}

.weather-icon {
    font-size: 15px;
}

.weather-temp {
    color: var(--text);
    font-weight: 400;
}

.weather-desc {
    text-transform: lowercase;
}

.clock-container {
    text-align: center;
}

.clock {
    font-size: 120px;
    font-weight: 200;
    color: #d0d0d0;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}

.date {
    font-size: 18px;
    color: #a0a0a0;
    margin-top: 20px;
    font-weight: 300;
}

.seconds {
    font-size: 48px;
    color: #808080;
    font-weight: 200;
}

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

.spinning {
    animation:spin 0.45s cubic-bezier(0.4,0,0.2,1) forwards;
}

.sf {
    display:block;
    opacity:0.9;
    pointer-events: none;
}

.nav-btn:disabled .sf {
    opacity: 0.28;
}

.nav-btn:hover:not(:disabled) .sf {
    opacity:1;
}

.nav-btn:hover:not(:disabled) {
    background:rgba(255,255,255,0.1);
}

.nav-btn:active:hover:not(:disabled) {
    background:rgba(255,255,255,0.18);
}

.addr-side .sf {
    opacity: 0.72;
}

.addr-wpr::before {
    content: '';
    position: absolute;
    inset: 0px;
    border-radius: 999px;
    box-shadow: 0 0 0 6px rgba(66, 140, 230, 0);
    transition: box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.addr-wpr:focus-within::before {
    box-shadow: 0 0 0 3px rgba(66, 140, 230, 0.55);
    transition: box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 0;
    gap: 4px;
    min-height: 32px;
    position: relative;
}

.tabs-container::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 44px;
    width: 40px;
    height: 32px;
    background: linear-gradient(to right, transparent, var(--bg) 80%);
    pointer-events: none;
    z-index: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tabs-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 16px;
    margin: 0;
    width: 10px;
    background: linear-gradient(to left, transparent, var(--bg) 90%);
    pointer-events: none;
    z-index: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 2;
}

.tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-family: 'Geist';
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.15);
}

.tab.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.20);
    color: #fff;
}

.tab span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.tab-close {
    background: none;
    border: none;
    color: var(--icon);
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.tab:hover .tab-close {
    opacity: 0.7;
}

.new-tab-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--icon);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.new-tab-btn:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.ai-panel {
    position: fixed;
    top: 90px;
    right: 16px;
    width: 320px;
    background: rgba(32, 33, 37, 0.92);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    user-select: none;
}

.ai-panel.collapsed .ai-panel-body { display: none; }

.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: grab;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    gap: 8px;
}

.ai-panel.collapsed .ai-panel-header { border-bottom: none; }
.ai-panel-header:active { cursor: grabbing; }

.ai-panel-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #e6e6e6;
}

.ai-gem-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #9b72cb);
    flex-shrink: 0;
}

.ai-panel-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-icon-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 3px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s, background 0.12s;
}

.ai-icon-btn:hover { color: #e6e6e6; background: rgba(255,255,255,0.08); }

.ai-panel-body {
    display: flex;
    flex-direction: column;
    height: 380px;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.ai-msg {
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.5;
    word-break: break-word;
}

.ai-msg.user {
    align-self: flex-end;
    background: rgba(66,133,244,0.2);
    border: 1px solid rgba(66,133,244,0.25);
    color: #c8c9cc;
    border-bottom-right-radius: 4px;
}

.ai-msg.ai {
    align-self: flex-start;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c8c9cc;
    border-bottom-left-radius: 4px;
}

.ai-msg.thinking {
    align-self: flex-start;
    color: #666;
    font-style: italic;
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 12px;
}

.ai-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.ai-text-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 6px 12px;
    color: #c8c9cc;
    font-family: 'Geist';
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s;
}

.ai-text-input:focus {
    border-color: rgba(66,133,244,0.5);
}

.ai-text-input::placeholder {
    color: #555860;
}

.ai-send-btn {
    background: rgba(66,133,244,0.2);
    border: 1px solid rgba(66,133,244,0.3);
    border-radius: 999px;
    color: #4285f4;
    cursor: pointer;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    flex-shrink: 0;
}

.ai-send-btn:hover { 
    background: rgba(66,133,244,0.35); 
    color: #7ab3f7;
}

.ai-analyze-pill {
    background: rgba(66, 133, 244, 0.12);
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: 999px;
    color: #7ab3f7;
    font-family: 'Geist';
    cursor: pointer;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ai-analyze-pill:hover {
    background: rgba(66, 133, 244, 0.22);
    border-color: rgba(66, 133, 244, 0.4);
    color: #a8ccfa;
}

.ai-analyze-pill:active {
    background: rgba(66, 133, 244, 0.3);
}