body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    overflow: hidden;
    background-color: #f9fbfd;
    color: #1f1f1f;
}

#sheets-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    height: 64px;
    box-sizing: border-box;
    background-color: #f9fbfd;
}

.logo img, .logo svg {
    height: 30px;
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.header-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.document-title {
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #1f1f1f;
}

.document-title:hover {
    border-color: #dadce0;
}

.header-icon {
    font-size: 18px;
    color: #444746;
    margin-left: 12px;
    cursor: pointer;
}

.menu-bar {
    display: flex;
    gap: 2px;
    margin-left: -4px;
}

.menu-item {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #1f1f1f;
}

.menu-item:hover {
    background-color: #e8eaed;
}

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

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: #444746;
}

.action-icon:hover {
    background-color: #e8eaed;
}

.video-call {
    width: auto;
    padding: 0 12px 0 16px;
    border-radius: 20px;
    gap: 4px;
}

.share-btn {
    display: flex;
    align-items: center;
    background-color: #c2e7ff;
    color: #001d35;
    padding: 0 16px;
    height: 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    gap: 8px;
}

.share-btn:hover {
    background-color: #b3dcf4;
}

.share-btn .lock-icon {
    font-size: 18px;
}

.profile-pic {
    width: 36px;
    height: 36px;
    background-color: #009688;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
    margin-left: 4px;
    position: relative;
}

.upload-tooltip {
    position: absolute;
    top: 60px;
    left: 45px;
    background-color: #0b57d0;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: opacity 0.5s;
}

.tooltip-arrow {
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #0b57d0;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background-color: #edf2fa;
    border-radius: 24px;
    margin: 4px 16px 8px 16px;
    height: 44px;
    box-sizing: border-box;
    gap: 2px;
    overflow-x: auto;
}

.toolbar::-webkit-scrollbar {
    display: none;
}

.menus-btn {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 18px;
    height: 32px;
    padding: 0 12px 0 8px;
    font-size: 14px;
    color: #444746;
    cursor: pointer;
    margin-right: 8px;
}

.menus-btn:hover {
    background-color: #f1f3f4;
}

.search-icon {
    font-size: 18px;
    margin-right: 6px;
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    color: #444746;
}

.tool-btn:hover:not(.disabled) {
    background-color: #e0e6ec;
}

.tool-btn .material-icons {
    font-size: 20px;
}

.tool-btn .arrow-small {
    font-size: 14px;
    margin-left: -4px;
}

.text-bold {
    font-size: 13px;
    font-weight: bold;
}

.tool-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background-color: #c7cdd4;
    margin: 0 6px;
}

.tool-dropdown {
    display: flex;
    align-items: center;
    padding: 0 4px 0 8px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #444746;
}

.tool-dropdown:hover {
    background-color: #e0e6ec;
}

.tool-dropdown .arrow {
    font-size: 18px;
    margin-left: 4px;
}

.font-family {
    width: 80px;
    justify-content: space-between;
}

.tool-btn-group {
    display: flex;
    align-items: center;
    border-radius: 4px;
    height: 32px;
}

.tool-input {
    width: 30px;
    text-align: center;
    font-size: 13px;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 0;
}

/* Formula Bar */
.formula-bar {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 32px;
    background-color: #fff;
}

.cell-reference {
    display: flex;
    align-items: center;
    color: #1f1f1f;
    font-size: 13px;
    font-family: Arial, sans-serif;
    padding: 0 4px;
    cursor: pointer;
}

.cell-reference .arrow {
    font-size: 16px;
    color: #444746;
}

.formula-separator {
    width: 1px;
    height: 20px;
    background-color: #c7cdd4;
    margin: 0 12px;
}

.fx-icon {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-weight: bold;
    color: #5f6368;
    margin-right: 12px;
    font-size: 14px;
}

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

.formula-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    font-family: Arial, sans-serif;
    color: #000;
}

/* Workspace and Scrollbars */
.main-area {
    display: flex;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-top: 1px solid #e3e9f3;
}

.workspace {
    flex-grow: 1;
    position: relative;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.vertical-scrollbar {
    width: 14px;
    background-color: #f8f9fa;
    border-left: 1px solid #e3e9f3;
    position: relative;
    display: flex;
    justify-content: center;
}

.scroll-thumb-v {
    width: 8px;
    height: 100px;
    background-color: #dadce0;
    border-radius: 4px;
    position: absolute;
    top: 2px;
}

.horizontal-scroll-area {
    display: flex;
    align-items: center;
    height: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e3e9f3;
    padding-left: 50px;
}

.scroll-arrows-h {
    display: flex;
    align-items: center;
}

.scroll-arrow-icon {
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
}

.horizontal-scrollbar {
    flex-grow: 1;
    height: 100%;
    position: relative;
    margin-left: 8px;
    margin-right: 14px;
    display: flex;
    align-items: center;
}

.scroll-thumb-h {
    height: 8px;
    width: 300px;
    background-color: #dadce0;
    border-radius: 4px;
    position: absolute;
    left: 2px;
}

/* Bottom Bar */
.bottom-bar {
    display: flex;
    align-items: center;
    height: 36px;
    background-color: #f8f9fa;
    border-top: 1px solid #e3e9f3;
    padding: 0 16px 0 40px;
}

.bottom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: #444746;
    margin-right: 16px;
}

.bottom-icon:nth-child(3) {
    margin-right: 24px;
}

.bottom-icon:hover {
    background-color: #e8eaed;
}

.sheet-tab {
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    background-color: transparent;
    color: #444746;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-top: 6px;
}

.sheet-tab.active {
    background-color: #e8f0fe;
    color: #0b57d0;
    border-bottom: 3px solid #0b57d0;
}

.sheet-tab:hover:not(.active) {
    background-color: #f1f3f4;
}

.sheet-tab .arrow {
    font-size: 18px;
    margin-left: 4px;
}
