/* Safari Browser Styles */

.browser-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--window-bg);
    border-radius: 0 0 10px 10px;
    font-family: 'Inter', sans-serif;
    color: var(--content-text);
}

/* Tab Bar */
.browser-tab-bar {
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.4);
    height: 40px;
    padding: 0 8px;
    border-bottom: 1px solid var(--window-border);
    overflow-x: auto;
}

.browser-tab-bar::-webkit-scrollbar {
    display: none;
}

.browser-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 150px;
    max-width: 250px;
    height: 32px;
    padding: 0 12px;
    margin-right: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.browser-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.browser-tab.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
}

.browser-tab-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.browser-tab-close {
    margin-left: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    background: none;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.browser-tab-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.browser-new-tab {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.browser-new-tab:hover {
    opacity: 1;
}

/* Toolbar */
.browser-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(40, 40, 40, 0.6);
    border-bottom: 1px solid var(--window-border);
    gap: 16px;
}

.browser-nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px 8px;
    border-radius: 4px;
}

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

.browser-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.browser-address-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 12px;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.browser-address-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    width: 100%;
    outline: none;
    font-family: inherit;
    text-align: center;
}

.browser-address-input:focus {
    text-align: left;
}

/* Content Area */
.browser-content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--content-bg);
}

.browser-tab-content {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.browser-tab-content.active {
    display: block;
}

/* Loading Bar */
.browser-loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: #4ade80;
    width: 0%;
    transition: width 0.2s ease;
    z-index: 10;
    opacity: 0;
}

/* Home Page */
.browser-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    height: 100%;
}

.browser-home h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.browser-favorites {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 600px;
}

.favorite-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.favorite-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background 0.2s, transform 0.1s;
}

.favorite-item:hover .favorite-icon {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.favorite-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* External Link Page */
.browser-external {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    text-align: center;
    padding: 32px;
}

.browser-external h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.browser-external p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.external-btn {
    background: rgba(0, 88, 208, 0.8);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.external-btn:hover {
    background: rgba(0, 88, 208, 1);
}

/* Responsive */
@media (max-width: 600px) {
    .browser-favorites {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}
