html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: block !important;
}

.voice-list-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px var(--spacing-lg);
    box-sizing: border-box;
}

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

.voice-list-header h2 {
    font-size: 1.8rem;
    color: var(--ink);
    margin-bottom: 10px;
}

.voice-list-header p {
    color: var(--ink-subtle);
}

.filter-section {
    background: var(--surface-1);
    padding: 20px;
    border-radius: var(--rounded-md);
    margin-bottom: 20px;
    border: 1px solid var(--hairline);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 0.9rem;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.filter-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.voice-count {
    margin-left: auto;
    color: var(--ink-subtle);
    font-size: 0.9rem;
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .voice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .voice-grid {
        grid-template-columns: 1fr;
    }

    .voice-list-header h2 {
        font-size: 1.4rem;
    }

    .filter-section {
        padding: 12px;
    }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .voice-count {
        margin-left: 0;
        margin-top: 10px;
    }
}

.voice-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    padding: 16px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.voice-card-content {
    flex: 1;
}

.voice-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.voice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
}

.voice-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.voice-gender {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.voice-gender.male {
    background: #dbeafe;
    color: #1d4ed8;
}

.voice-gender.female {
    background: #fce7f3;
    color: #be185d;
}

.voice-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.voice-detail-item {
    display: flex;
    gap: 4px;
}

.voice-detail-label {
    color: var(--ink-tertiary);
    white-space: nowrap;
}

.voice-detail-value {
    color: var(--ink);
    word-break: break-all;
}

.voice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.voice-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.voice-tag.multilingual {
    background: rgba(204, 120, 92, 0.1);
    color: var(--primary);
}

.voice-tag.hd {
    background: #fef3c7;
    color: #92400e;
}

.voice-tag.emotion {
    background: #e0e7ff;
    color: #3730a3;
}

.voice-tag.roleplay {
    background: #fce7f3;
    color: #9d174d;
}

.voice-preview-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--rounded-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

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

.voice-preview-btn:disabled {
    background: var(--ink-tertiary);
    cursor: not-allowed;
}

.voice-preview-btn.playing {
    background: var(--semantic-error);
}

.preview-text {
    font-size: 0.75rem;
    color: var(--ink-tertiary);
    text-align: center;
    margin-top: 8px;
}

.collapsible-section {
    margin: 8px 0;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink);
    transition: var(--transition);
}

.collapsible-header:hover {
    background: var(--surface-3);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    font-size: 0.75rem;
    color: var(--ink-subtle);
    padding: 0 10px;
    border-left: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    border-bottom-left-radius: var(--rounded-sm);
    border-bottom-right-radius: var(--rounded-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.collapsible-content.show {
    max-height: 200px;
    padding: 10px;
    margin-bottom: 10px;
    opacity: 1;
}

.collapsible-icon {
    transition: transform 0.3s ease;
}

.collapsible-icon.rotated {
    transform: rotate(180deg);
}

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

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .voice-count {
        margin-left: 0;
        text-align: center;
    }
}
