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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    min-height: 400px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #666;
    font-size: 1.1em;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input, .input-group textarea, .input-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#categoryDropdown {
    margin-left: 10px;
    width: auto;
    flex-grow: 1;
}

.category-group {
    display: flex;
}

.category-group input {
    flex-grow: 2;
}

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

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#logoutBtn {
    background: #dc3545;
    margin-left: 10px;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.snippet-list {
    margin-top: 30px;
}

.empty-list-message {
    text-align: center;
    color: #666;
    padding: 20px;
}

.snippet-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.snippet-content {
    margin-bottom: 10px;
    line-height: 1.4;
}

.snippet-content h1,
.snippet-content h2,
.snippet-content h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.snippet-content ul,
.snippet-content ol {
    padding-left: 2em;
}

.snippet-content li {
    margin-bottom: 0.5em;
}

.snippet-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    color: #666;
    margin-left: 0;
}

.snippet-content pre {
    background-color: #f4f4f4;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
}

.snippet-content code {
    font-family: 'Courier New', Courier, monospace;
}

.snippet-content p {
    margin-bottom: 1em;
}

.snippet-meta {
    font-size: 0.9em;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #218838;
}

.more-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.more-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-info {
    margin: 0 15px;
    align-self: center;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .snippet-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
