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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr 250px;
    gap: 20px;
    padding: 20px 0 40px;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr 1fr;
    }
    .sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
}

.editor-panel,
.snippets-panel,
.pro-panel,
.tips-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: 'Courier New', monospace;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    flex: 1;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85em;
}

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

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

.snippets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.snippets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.snippet-item {
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snippet-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.snippet-item h4 {
    font-size: 0.95em;
    margin-bottom: 5px;
    color: #333;
}

.snippet-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: #999;
    margin-bottom: 8px;
}

.snippet-code {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    max-height: 150px;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
}

.snippet-tags {
    margin-top: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
}

.snippet-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.snippet-actions button {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.8em;
}

.pro-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pro-panel h3 {
    color: white;
}

.pro-panel p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.tips-panel {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
