/* fuck css ong */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.browser-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

.toolbar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--toolbar-bg);
    height: 48px;
}

.window-controls {
    display: flex;
    margin-right: 12px;
}

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: none;
    cursor: pointer;
}

.window-btn.minimize {
    background-color: #fdbc40;
}

.window-btn.maximize {
    background-color: #35cd4b;
}

.window-btn.close {
    background-color: #fd5f51;
    margin-right: 0;
}

.nav-controls {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.nav-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--icon-color);
    margin-right: 4px;
}

.nav-btn:hover {
    background-color: var(--button-hover);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.url-bar-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
    margin: 0 8px;
}

.url-bar {
    flex-grow: 1;
    height: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 0 40px 0 16px;
    font-size: 14px;
    background-color: var(--urlbar-bg);
    color: var(--text-primary);
    outline: none;
}

.url-bar:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.url-bar-icons {
    position: absolute;
    right: 8px;
    display: flex;
}

.url-icon {
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--icon-color);
    margin-left: 8px;
}

.url-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tab-bar {
    height: 36px;
    background-color: var(--tabbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
}

.tabs-container {
    display: flex;
    height: 100%;
    align-items: center;
    flex-grow: 1;
}

.tab {
    height: 28px;
    min-width: 120px;
    max-width: 200px;
    background-color: var(--tab-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    margin-right: 4px;
    cursor: pointer;
    position: relative;
    color: var(--text-primary);
}

.tab.active {
    background-color: var(--tab-active-bg);
    height: 30px;
    border-bottom: 1px solid var(--tab-active-bg);
    margin-bottom: -1px;
}

.tab-title {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.tab-close {
    background: none;
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--icon-color);
    margin-left: 8px;
    font-size: 12px;
    opacity: 0;
}

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

.tab-close:hover {
    background-color: var(--button-hover);
}

.new-tab-btn {
    height: 24px;
    width: 24px;
    border-radius: 4px;
    border: none;
    background-color: var(--button-bg);
    color: var(--icon-color);
    cursor: pointer;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.new-tab-btn:hover {
    background-color: var(--button-hover);
}

.content-area {
    flex-grow: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.webview {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.webview.active {
    display: block;
}

.new-tab-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ntp-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    display: none;
}

.new-tab-page.active {
    display: flex;
}

.ntp-logo {
    font-size: 72px;
    font-weight: bold;
    margin-bottom: 40px;
    color: var(--accent-color);
}

.search-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    margin-bottom: 40px;
}

.ntp-search {
    flex-grow: 1;
    height: 44px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    padding: 0 20px;
    font-size: 16px;
    background-color: var(--urlbar-bg);
    color: var(--text-primary);
    outline: none;
}

.ntp-search:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

#ntp-search-btn {
    height: 44px;
    padding: 0 24px;
    border-radius: 22px;
    border: none;
    background-color: var(--accent-color);
    color: white;
    font-size: 16px;
    margin-left: 12px;
    cursor: pointer;
}

#ntp-search-btn:hover {
    background-color: var(--accent-hover);
}

.quick-links {
    width: 100%;
    max-width: 800px;
}

.quick-links h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.link-favicon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--button-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.link-favicon svg {
    width: 24px;
    height: 24px;
    fill: var(--icon-color);
}

.link-title {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
}

.status-bar {
    height: 22px;
    background-color: var(--statusbar-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zoom-controls {
    display: flex;
    align-items: center;
}

.zoom-btn {
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--icon-color);
    font-size: 12px;
}

.zoom-level {
    margin: 0 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Context Menu */
.context-menu {
    position: absolute;
    background-color: var(--menu-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    min-width: 160px;
}

.menu-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.menu-item:hover {
    background-color: var(--button-hover);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--modal-bg);
    border-radius: 8px;
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.modal-header h2 {
    font-size: 20px;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--icon-color);
}

.modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.setting-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.setting-option label {
    margin-right: 12px;
    color: var(--text-primary);
}

.setting-option select, .setting-option input[type="text"] {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-primary);
}

.setting-option input[type="checkbox"] {
    margin-right: 8px;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
}

.modal-footer button:hover {
    background-color: var(--accent-hover);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}
