/* Reusable Component Library */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-ghost {
    background: transparent;
    color: var(--text-color);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-outline:active {
    background: rgba(10, 132, 255, 0.1);
}


.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
}

.card-compact {
    padding: 1rem;
}

.card-horizontal {
    display: flex;
    gap: 1rem;
}

.card-horizontal .card-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

.card-horizontal .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Form Elements */
.input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input:focus {
    border-color: var(--accent-color);
}

.input::placeholder {
    color: var(--text-muted);
}

.select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.toggle {
    position: relative;
    width: 50px;
    height: 28px;
    background: var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: var(--accent-color);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(22px);
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
}

/* Chips and Badges */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.chip i {
    font-size: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #30d158;
}

.badge-warning {
    background: #ff9f0a;
}

.badge-error {
    background: #ff375f;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: var(--border-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* List */
.list {
    list-style: none;
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.list-item-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.list-item-action {
    color: var(--text-muted);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.avatar-large {
    width: 80px;
    height: 80px;
}

.avatar-small {
    width: 24px;
    height: 24px;
}

/* Tag */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Rating Stars */
.stars {
    display: inline-flex;
    gap: 0.25rem;
}

.star {
    color: #ff9f0a;
}

.star.empty {
    color: var(--text-muted);
}

/* Back Button */
.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    cursor: pointer;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.section-header-action {
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

/* Grid */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Info Row */
.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.info-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.info-row-content {
    flex: 1;
}

.info-row-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-row-value {
    font-weight: 600;
}