:root {
    --primary-color: #0052CC;
    --primary-hover: #0747A6;
    --secondary-color: #6B778C;
    --success-color: #00875A;
    --danger-color: #DE350B;
    --warning-color: #FFAB00;
    --background: #FFFFFF;
    --surface: #F4F5F7;
    --surface-hover: #EBECF0;
    --border: #DFE1E6;
    --text-primary: #172B4D;
    --text-secondary: #5E6C84;
    --text-muted: #97A0AF;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.language-selector:hover {
    border-color: var(--primary-color);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* Main Content */
.main {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--surface-hover);
    border-color: var(--secondary-color);
}

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

.action-group {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--surface-hover);
}

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

.action-btn.primary:hover {
    background: var(--primary-hover);
}

/* Content Area */
.content-area {
    padding: 1.5rem;
    min-height: 500px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.capture-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.capture-btn:hover {
    background: var(--primary-hover);
}

/* Clipboard List */
.clipboard-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.clipboard-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.2s;
    position: relative;
}

.clipboard-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.clipboard-item.pinned {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(255, 171, 0, 0.05) 0%, rgba(255, 171, 0, 0.02) 100%);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.item-type {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary);
}

.type-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-content {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
    margin-bottom: 1rem;
}

.item-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.snippet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.snippet-name {
    font-weight: 600;
    color: var(--primary-color);
}

.snippet-category {
    padding: 0.125rem 0.5rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.item-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.item-btn.copy-btn:hover {
    border-color: var(--success-color);
    color: var(--success-color);
}

.item-btn.delete-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
}

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

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

/* Compact View */
body.compact-view .clipboard-list {
    grid-template-columns: 1fr;
}

body.compact-view .clipboard-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
}

body.compact-view .item-header {
    margin-bottom: 0;
    margin-right: 1rem;
    min-width: 150px;
}

body.compact-view .item-content {
    flex: 1;
    margin-bottom: 0;
    margin-right: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.compact-view .item-image {
    width: 60px;
    height: 40px;
    margin-bottom: 0;
    margin-right: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .toolbar {
        padding: 1rem;
    }
    
    .filter-group {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .action-group {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
    }
    
    .clipboard-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .filter-btn span,
    .action-btn span {
        display: none;
    }
    
    .filter-btn,
    .action-btn {
        padding: 0.625rem;
        justify-content: center;
    }
}