:root {
    --primary-color: #6366f1;
    --hover-color: #4f46e5;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.app {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.algorithms, .options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

h2 {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.algorithm-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.algorithm {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 4px;
    cursor: pointer;
}

.algorithm:hover {
    background: #eee;
}

.algorithm input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.algorithm .name {
    font-weight: 500;
}

.algorithm .bits {
    font-size: 0.75rem;
    color: #666;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 4px;
    cursor: pointer;
}

.option:hover {
    background: #eee;
}

.option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

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

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

.btn-icon {
    font-size: 1.25rem;
}

/* Content Styles */
.content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.editor-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.editor-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: none;
    letter-spacing: normal;
}

.editor-stats {
    font-size: 0.75rem;
    color: #666;
}

#inputEditor {
    width: 100%;
    height: 300px;
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hash-result {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
}

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

.hash-name {
    font-weight: 600;
    color: var(--text-color);
}

.hash-bits {
    font-size: 0.75rem;
    color: #666;
}

.hash-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--text-color);
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: 4px;
    word-break: break-all;
    cursor: pointer;
    transition: background 0.2s;
}

.hash-value:hover {
    background: #eee;
}

.hash-length {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }

    .content {
        padding: 1rem;
    }

    #inputEditor {
        height: 200px;
    }
}