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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #ffffff;
    color: #000000;
    padding: 20px;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
}

#loading {
    text-align: center;
    padding: 40px;
}

/* User Profile Section */
.user-profile {
    margin-bottom: 30px;
}

details {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

summary {
    cursor: pointer;
    font-weight: 600;
    padding: 10px;
    user-select: none;
}

.subscription-controls {
    padding: 15px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select, input, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.premium-info {
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

button {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

button:hover {
    background: #333;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Spreadsheets Section */
.spreadsheets-section h2 {
    margin-bottom: 20px;
}

.action-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spreadsheet-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.spreadsheet-card {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.spreadsheet-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spreadsheet-card h3 {
    margin-bottom: 8px;
}

.spreadsheet-card p {
    color: #666;
    font-size: 14px;
}

/* Spreadsheet Editor */
.spreadsheet-editor {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.editor-header {
    margin-bottom: 20px;
}

.grid-container {
    overflow-x: auto;
    margin: 20px 0;
}

.spreadsheet-grid {
    display: table;
    border-collapse: collapse;
}

.grid-row {
    display: table-row;
}

.grid-cell {
    display: table-cell;
    border: 1px solid #ccc;
    padding: 0;
    position: relative;
    min-width: 100px;
    height: 40px;
}

.grid-cell input {
    width: 100%;
    height: 100%;
    border: none;
    padding: 8px;
    background: transparent;
}

.grid-cell.selected input {
    background: #e3f2fd;
}

.add-row-btn {
    width: 100%;
    height: 30px;
    margin-top: 5px;
}

.add-col-btn {
    width: 30px;
    height: 100%;
    writing-mode: vertical-rl;
    margin-left: 5px;
}

.cell-menu {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
}

.cell-menu h4 {
    margin-bottom: 10px;
}

.selected-cells {
    margin: 10px 0;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.formula-section {
    margin-top: 15px;
}

.editor-footer {
    margin-top: 20px;
}

.file-input-group {
    margin: 15px 0;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .spreadsheet-list {
        grid-template-columns: 1fr;
    }
}

