/* Base Variables - Matching jemoka.com palette */
body {
    --gray-3: #929292;
    --gray-2: #D5D5D5;
    --gray-1: #EBEBEB;

    --bg: #F7F7F7;
    --fg: #2F3338;
    --accent: #434D5F;

    --blue: #37A5BE;
    --green: #26A671;
    --yellow: #EAEDAD;
    --yellow-accent: #DCE279;
    --yellow-fg: #84876C;
    --orange: #F27200;
    --red: #FF3900;

    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: var(--fg);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

* {
    font-size: 15px;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 5px;
    margin-top: 15px;
}

h1 { font-size: 1.3em; }
h2 { font-size: 1.1em; }
h3 { font-size: 1em; }

p {
    margin-bottom: 9px;
}

a {
    color: var(--yellow-fg);
    text-decoration: none;
}

a:hover {
    border-bottom: 1px solid var(--yellow);
}

code, pre {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.95em;
    background: var(--gray-1);
    padding: 2px 6px;
    border-radius: 2px;
}

/* Header */
.logo-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    background: var(--green);
    color: white;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
}

.search-box {
    display: flex;
    align-items: center;
    margin-top: 5px;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 2px;
    border: 1px solid var(--gray-2);
    padding: 0 10px;
}

.search-icon {
    font-size: 14px;
    color: var(--yellow-fg);
    margin-right: 8px;
}

.search-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--gray-3);
}

/* Divider */
.divider {
    width: 100%;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-1);
    margin-top: 10px;
}

/* Feature Cards */
.feature-card {
    border: 1px solid #000;
    border-radius: 2px;
    padding: 12px;
    min-width: 140px;
    flex: 1;
}

.feature-card a {
    color: white !important;
    border: none !important;
}

.feature-blue {
    background: var(--blue);
    color: white;
}

.feature-green {
    background: var(--green);
    color: white;
}

.feature-orange {
    background: var(--orange);
    color: white;
}

.feature-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 12px;
    opacity: 0.9;
}

/* Social/Quick Links */
.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    border: 1px solid #000;
    color: white !important;
    text-decoration: none;
}

.social-link:hover {
    border-bottom: 1px solid #000;
    opacity: 0.9;
}

.social-link.github {
    background: #21262d;
}

.social-link.twitter {
    background: #1da1f2;
}

.social-link.reddit {
    background: #ff4500;
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.color-swatch {
    padding: 12px 8px;
    border-radius: 2px;
    border: 1px solid var(--gray-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-swatch span {
    font-size: 11px;
    font-weight: 500;
}

.color-swatch code {
    font-size: 10px;
    background: transparent;
    padding: 0;
}

/* Typography Sample */
.typography-sample {
    background: white;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
    padding: 16px;
    margin-top: 10px;
}

/* Buttons */
.button-samples {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.btn-primary:hover {
    background: #2e8fa6;
}

.btn-secondary {
    background: var(--gray-1);
    color: var(--fg);
    border-color: var(--gray-2);
}

.btn-secondary:hover {
    background: var(--gray-2);
}

.btn-danger {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.btn-danger:hover {
    background: #e63300;
}

.btn-ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--gray-2);
}

.btn-ghost:hover {
    background: var(--gray-1);
}

/* Form Elements */
.form-samples {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-3);
}

.input {
    padding: 8px 12px;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
    background: white;
}

.input:focus {
    outline: none;
    border-color: var(--blue);
}

.input::placeholder {
    color: var(--gray-3);
}

/* Spreadsheet Preview */
.spreadsheet-preview {
    background: white;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.formula-bar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--gray-2);
    background: var(--gray-1);
    padding: 6px 0;
}

.cell-ref {
    padding: 4px 12px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    border-right: 1px solid var(--gray-2);
    min-width: 50px;
    text-align: center;
}

.formula-input {
    padding: 4px 12px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    color: var(--green);
}

.sheet-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
}

.sheet-grid th,
.sheet-grid td {
    text-align: left;
    padding: 3px 10px;
    border-bottom: 1px solid var(--gray-2);
}

.sheet-grid th {
    background: var(--gray-1);
    font-weight: 500;
    text-align: center;
    color: var(--gray-3);
    font-size: 12px;
    padding: 0 10px;
    border-bottom: 0.5px solid var(--gray-3);
}

.sheet-grid .row-header {
    background: var(--gray-1);
    font-weight: 500;
    text-align: center;
    color: var(--gray-3);
    width: 40px;
    font-size: 12px;
    border-right: 1px solid var(--gray-2);
}

.cell-selected {
    background: #e8f4f8;
    outline: 2px solid var(--blue);
    outline-offset: -1px;
    font-weight: 500;
}

/* Reference Table */
.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
}

.reference-table th,
.reference-table td {
    text-align: left;
    padding: 3px 10px;
    border-bottom: 1px solid var(--gray-2);
}

.reference-table th {
    font-weight: 600;
    background: var(--gray-1);
    padding: 0 10px;
    border-bottom: 0.5px solid var(--gray-3);
}

.ref-left {
    font-weight: 500;
}

.ref-right {
    color: var(--gray-3);
}

/* Sheet Tabs */
.sheet-tabs {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.sheet-tab {
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--gray-2);
    border-radius: 2px 2px 0 0;
    font-size: 12px;
    cursor: pointer;
}

.sheet-tab.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.sheet-tab.add-tab {
    padding: 6px 10px;
    font-weight: 600;
    color: var(--gray-3);
}

.sheet-tab.add-tab:hover {
    background: var(--gray-1);
}

/* Cell States */
.cell-states {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.cell-demo {
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
    font-size: 12px;
    text-align: center;
}

.cell-hover {
    background: #fafafa;
}

.cell-editing {
    outline: 2px solid var(--blue);
    outline-offset: -1px;
}

.cell-selected-demo {
    background: #e8f4f8;
    outline: 2px solid var(--blue);
    outline-offset: -1px;
}

.cell-error {
    background: #fff0ed;
    border-color: var(--red);
    color: var(--red);
}

.cell-formula {
    color: var(--green);
    font-family: "IBM Plex Mono", monospace;
}

/* Icons */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    background: white;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
}

.icon-item .icon {
    font-size: 16px;
    color: var(--fg);
}

.icon-item span:last-child {
    font-size: 10px;
    color: var(--gray-3);
}

/* Notifications */
.notifications {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.notification {
    padding: 10px 14px;
    border-radius: 2px;
    font-size: 12px;
    border-left: 3px solid;
}

.notification-info {
    background: #e8f4f8;
    border-color: var(--blue);
    color: var(--fg);
}

.notification-warning {
    background: var(--yellow);
    border-color: var(--yellow-accent);
    color: var(--fg);
}

.notification-error {
    background: #fff0ed;
    border-color: var(--red);
    color: var(--red);
}

/* Spacing Demo */
.spacing-demo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.space-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.space-box {
    height: 16px;
    background: var(--blue);
    border-radius: 2px;
}

.space-item span {
    font-size: 11px;
    color: var(--gray-3);
    font-family: "IBM Plex Mono", monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        margin-top: 12px;
    }

    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
