
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy[src]:not([src^="data:"]) {
    opacity: 1;
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-clickable {
    cursor: pointer;
}

.card-glow {
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card-gradient {
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-light));
    border: 1px solid rgba(178, 255, 90, 0.1);
}



.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-md);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
    text-align: center;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: rgba(178, 255, 90, 0.1);
    border-color: var(--color-primary);
}

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

.btn-outline:hover:not(:disabled) {
    background-color: rgba(178, 255, 90, 0.1);
}

.btn-text {
    background-color: transparent;
    color: var(--color-primary);
    padding: var(--spacing-sm) var(--spacing-md);
}

.btn-text:hover:not(:disabled) {
    background-color: rgba(178, 255, 90, 0.1);
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.btn-full {
    width: 100%;
}



.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}

.badge-primary {
    background-color: rgba(255, 148, 90, 0.2);
    color: var(--color-primary);
}

.badge-success {
    background-color: rgba(175, 173, 76, 0.2);
    color: var(--color-success);
}

.badge-warning {
    background-color: rgba(255, 152, 0, 0.2);
    color: var(--color-warning);
}

.badge-error {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--color-error);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-surface-light);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    transition: background-color var(--transition-fast);
}

.chip:hover {
    background-color: rgba(255, 175, 90, 0.1);
}

.chip-selected {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg);
}



.input {
    width: 100%;
    padding: var(--spacing-md);
    font-size: var(--font-size-md);
    background-color: var(--color-surface-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(178, 255, 90, 0.2);
}

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

.input-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
}

.checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--spacing-xs);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--color-bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: fadeIn 0.2s ease;
}

.modal {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-surface-light);
    color: var(--color-text);
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}



.accordion {
    border-radius: var(--radius-lg);
}

.accordion-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(15, 19, 25, 0.94), rgba(15, 19, 25, 0.98));
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: var(--spacing-lg);
    background-color: rgba(18, 23, 30, 0.96);
    color: var(--color-text);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.accordion-header.active {
    background-color: rgba(255, 255, 255, 0.07);
}

.accordion-title {
    font-size: var(--font-size-md);
    font-weight: 600;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background-color: rgba(18, 23, 30, 0.96);
    transform: translateY(-4px);
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.28s ease;
    will-change: max-height;
}

.accordion-body.active {
    opacity: 1;
    transform: translateY(0);
}

.accordion-content {
    padding: var(--spacing-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}



.divider {
    height: 1px;
    background-color: var(--color-border);
    margin: var(--spacing-lg) 0;
}



.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-sm);
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: var(--font-size-lg);
}



.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-surface-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}



.empty-state {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    color: var(--color-text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
}

.empty-state-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 50%;
}

.empty-state-eye-icon {
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
}

.empty-state-text {
    font-size: var(--font-size-lg);
}


/* ===================================
   MOBILE ADAPTATION FOR COMPONENTS
   =================================== */

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
        padding: 12px var(--spacing-lg);
    }

    .btn-sm {
        min-height: 40px;
        padding: 8px var(--spacing-md);
    }

    .btn-lg {
        min-height: 56px;
        padding: 16px var(--spacing-xl);
    }

    /* Better touch targets for checkboxes */
    .checkbox {
        width: 24px;
        height: 24px;
    }

    .checkbox:checked::after {
        left: 6px;
        top: 2px;
        width: 6px;
        height: 12px;
    }

    /* Modal adjustments for mobile */
    .modal-overlay {
        padding: var(--spacing-md);
    }

    .modal {
        padding: var(--spacing-lg);
        max-height: 85vh;
    }

    .modal-close {
        width: 40px;
        height: 40px;
    }
}

/* Small devices adaptations */
@media (max-width: 480px) {
    .card {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
    }

    .modal {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
    }

    .modal-title {
        font-size: var(--font-size-lg);
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .accordion-header {
        padding: var(--spacing-md);
    }

    .accordion-content {
        padding: var(--spacing-md);
    }

    .empty-state {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .empty-state-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .empty-state-eye-icon {
        width: 32px;
        height: 32px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .card {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .modal {
        padding: var(--spacing-sm) var(--spacing-md);
        max-width: 100%;
    }

    .modal-overlay {
        padding: var(--spacing-sm);
    }

    .btn {
        font-size: var(--font-size-sm);
        padding: 10px var(--spacing-md);
    }

    .badge {
        font-size: var(--font-size-xs);
        padding: 2px var(--spacing-sm);
    }

    .chip {
        font-size: var(--font-size-xs);
        padding: 6px var(--spacing-sm);
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
        padding: var(--spacing-md);
    }

    .modal-title {
        font-size: var(--font-size-lg);
    }

    .empty-state {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .empty-state-icon-wrapper {
        width: 56px;
        height: 56px;
        margin-bottom: var(--spacing-md);
    }

    .empty-state-eye-icon {
        width: 28px;
        height: 28px;
    }
}

/* Tablets - more spacing */
@media (min-width: 768px) {
    .btn:hover {
        transform: translateY(-1px);
    }

    .card:hover {
        transform: translateY(-4px);
    }
}
