* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.main-content {
    display: flex;
    gap: 20px;
    height: calc(100vh - 120px);
}

.sidebar {
    width: 300px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tags-section, .details-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tags-section {
    flex: 1;
}

.details-section {
    height: 300px;
    overflow-y: auto;
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.repo-list {
    list-style: none;
}

.repo-item {
    padding: 10px;
    margin: 5px 0;
    background: #ecf0f1;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.repo-item:hover {
    background: #d5dbdb;
}

.repo-item.active {
    background: #3498db;
    color: white;
}

.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.tag-item {
    background: #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tag-item:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.tag-item.selected {
    border-color: #3498db;
    background: #e8f4f8;
}

.tag-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.tag-digest {
    font-size: 0.8em;
    color: #7f8c8d;
    word-break: break-all;
}

.tag-actions {
    margin-top: 10px;
}

.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.tag-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.detail-row {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
}

.detail-label {
    font-weight: bold;
    color: #2c3e50;
    min-width: 120px;
    margin-right: 10px;
}

.detail-value {
    color: #34495e;
    word-break: break-all;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.error {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.success {
    background: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}
