/* Custom Styles for Linkfy Hub */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #212529;
}

/* Badge Styles */
.badge-custom {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

.badge-custom-vip {
    background-color: rgba(243 232 255);
    color: rgb(147 51 234);
}

.badge-custom-hot {
    background-color: rgb(254 226 226);
    color: rgb(220 38 38) !important;
}

.badge-custom-popular {
    background-color: rgb(219 234 254);
    color: rgb(37 99 235);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

/* Icon Circle */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Hover Effect */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 1.5rem !important;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Card Border Radius */
.card {
    border-radius: 1.5rem !important;
}

/* Category Card */
.category-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.category-card:hover .material-icons {
    color: white !important;
}

/* Like Button */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

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

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

.like-btn .material-icons {
    font-size: 18px;
}

/* Broken Link Button */
.broken-link-btn {
    text-decoration: none;
    transition: color 0.3s ease;
}

.broken-link-btn:hover {
    color: var(--danger-color) !important;
}

/* Search Input */
.input-group-lg .form-control {
    border-radius: 0.5rem 0 0 0.5rem;
}

.input-group-lg .btn {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Stats Box */
.stats-box {
    transition: all 0.3s ease;
}

.stats-box:hover {
    transform: scale(1.05);
    background-color: #e9ecef !important;
}

/* ADV Placeholder */
.adv-placeholder {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Material Icons Alignment */
.material-icons {
    vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .icon-circle {
        width: 40px;
        height: 40px;
    }

    .icon-circle .material-icons {
        font-size: 20px;
    }

    .icon-circle-lg {
        width: 60px;
        height: 60px;
    }

    .card-title {
        font-size: 1rem;
    }

    .category-card {
        padding: 1rem !important;
    }

    .category-card .material-icons {
        font-size: 36px !important;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Footer */
footer a:hover {
    opacity: 0.8;
}

/* Tag Links */
.tag-link {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: var(--primary-color) !important;
    transform: scale(1.05);
}

/* Card Image */
.card-img-top {
    transition: transform 0.3s ease;
}

.hover-card:hover .card-img-top {
    transform: scale(1.02);
}

/* Content Rating Badges */
.position-absolute .badge {
    font-size: 0.75rem;
}

/* Filter Section Styles */
.filter-section {
    padding: 2rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: 3rem;
}

.filter-section h3 {
    color: #495057;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.filter-section .btn-filter {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    margin: 0.25rem;
    border-radius: 50px;
    font-size: 0.95rem;
    color: #495057;
    background-color: white;
    border: 1px solid #dee2e6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-section .btn-filter:hover,
.filter-section .btn-filter.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.15);
}

.filter-section .btn-filter .count {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 0.3rem;
}

.filter-section .show-more {
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-section .show-more:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .category-row {
        margin: -0.25rem;
    }
    .category-filters .btn {
        margin: 0.25rem !important;
    }
}

.category-filter-buttons::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.category-filter-buttons .btn {
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.3s ease;
    min-width: max-content;
    margin: 0.25rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.category-filter-buttons .btn:hover,
.category-filter-buttons .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(13,110,253,0.2);
}

/* Scroll indicators */
.category-filter-container::before,
.category-filter-container::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.category-filter-container::before {
    left: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23495057'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.category-filter-container::after {
    right: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23495057'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.category-filter-container.can-scroll-left::before,
.category-filter-container.can-scroll-right::after {
    opacity: 1;
}

/* Related Content Cards */
.related-cards {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .related-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* Soft Danger Button */
.btn-soft-danger {
    color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-soft-danger i {
    color: var(--danger-color);
    transition: color 0.2s ease;
}

.btn-soft-danger:hover:not(.disabled) {
    color: white !important;
    background-color: var(--danger-color);
}

.btn-soft-danger:hover:not(.disabled) i {
    color: white !important;
}

/* Badge Styles */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}


.badge-custom-new {
    background: rgb(220 252 231);
    color: rgb(22 163 74);
}



/* ====================================
   Footer Styles - Modern 2025 Design
   ==================================== */
.footer-custom {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    border-top: 3px solid #0f3460;
}

.footer-custom h5,
.footer-custom h6 {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-text {
    color: #b8c1cc;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-link {
    color: #b8c1cc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: #4e9af1;
    transform: translateX(5px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.3;
}

.footer-copyright {
    color: #8a95a5;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-custom {
        text-align: center;
    }

    .footer-custom .row > div {
        margin-bottom: 2rem;
    }

    .footer-link:hover {
        transform: translateX(0);
    }
}

/* View Details Button Hover - Light & Soft */
.btn-outline-primary.btn-sm.rounded-pill:hover {
    background-color: rgba(13, 110, 253, 0.08) !important;
    color: var(--primary-color) !important;
    border-color: rgba(13, 110, 253, 0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.12);
}

/* Modern Filter Buttons */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.filter-btn:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.15);
}

.filter-btn:hover i {
    transform: scale(1.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.filter-btn.active i {
    color: #ffffff;
}

/* Mobile responsive for filter buttons */
@media (max-width: 768px) {
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 130px;
        justify-content: center;
    }

    .filter-btn span {
        font-size: 0.85rem;
    }
}

/* Advertisement Card Placeholder */
.adv-card-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.adv-card-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.adv-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.adv-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.adv-content p {
    font-size: 1rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Card Date Info - Clean and Simple */
.card-date-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.25rem 0;
}

.card-date-info i {
    font-size: 0.95rem;
    color: #6c757d;
}

.card-date-info span {
    color: #495057;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    color: #ffffff;
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-consent-header i {
    font-size: 1.5rem;
    color: #4CAF50;
}

.cookie-consent-header h5 {
    font-weight: 600;
    color: #ffffff;
}

.cookie-consent-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 1.25rem;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-buttons .btn {
    padding: 0.65rem 1.75rem;
    font-weight: 500;
    border-radius: 50px;
}

/* Cookie Rejection Modal */
.cookie-rejection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-rejection-content {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-buttons .btn {
        width: 100%;
    }

    .cookie-rejection-content {
        padding: 1.5rem;
    }
}

/* Badge Detail Styles - Larger for Single Card View */
.badge-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-detail i {
    font-size: 1.1rem;
}

.badge-detail-vip {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #9333ea;
}

.badge-detail-hot {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.badge-detail-new {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.badge-detail-popular {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

/* ========================================
   MOBILE RESPONSIVE FIXES
   ======================================== */

@media (max-width: 576px) {
    /* Fix Badge Overlap with Title */
    .badge-detail {
        position: absolute;
        top: 0.75rem !important;
        right: 0.75rem !important;
        font-size: 0.75rem !important;
        padding: 0.35rem 0.7rem !important;
        gap: 0.25rem !important;
        z-index: 10;
    }

    .badge-detail i {
        font-size: 0.9rem !important;
    }

    /* Add padding to title to avoid overlap with badge */
    .card-body h1.h2 {
        padding-right: 90px !important;
    }

    /* Fix Stats Boxes - Make them responsive */
    .stats-box {
        padding: 0.75rem 0.5rem !important;
    }

    .stats-box h6 {
        font-size: 0.8rem !important;
        word-break: keep-all !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .stats-box p {
        font-size: 0.7rem !important;
        word-break: keep-all !important;
        white-space: nowrap !important;
    }

    .stats-box i {
        font-size: 1.2rem !important;
    }

    /* Fix "Open Channel on Telegram" Button */
    .btn-primary.btn-lg.rounded-pill {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 0.95rem !important;
        min-height: 56px !important;
        margin-bottom: 1.25rem !important;
    }

    .btn-primary.btn-lg.rounded-pill span {
        font-size: 0.9rem !important;
    }

    .btn-primary.btn-lg.rounded-pill i {
        font-size: 1.1rem !important;
    }

    /* Fix "Report Broken Link" Button - PIÙ STRETTO */
    .btn-soft-danger.rounded-pill {
        padding: 0.5rem 0.85rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }

    /* Make buttons layout responsive */
    .d-flex.justify-content-between {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        justify-content: space-between !important;
    }

    .like-btn {
        flex: 0 0 auto !important;
        min-width: 70px !important;
        max-width: 90px !important;
    }

    .broken-link-btn {
        flex: 0 0 auto !important;
        max-width: fit-content !important;
    }

    /* Fix card header layout on mobile */
    .card-body .d-flex.align-items-center {
        flex-direction: row !important;
    }

    .card-body .d-flex.align-items-center > div:first-child {
        width: 64px !important;
        height: 64px !important;
        margin-right: 1rem !important;
    }

    /* Adjust card padding on mobile */
    .card-body {
        padding: 1.25rem !important;
    }

    /* Fix Homepage Cards - Broken link button alignment */
    .card .d-flex.justify-content-between {
        justify-content: space-between !important;
    }

    .card .broken-link-btn {
        margin-left: auto !important;
    }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 768px) {
    .badge-detail {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.85rem !important;
    }

    .btn-primary.btn-lg.rounded-pill {
        width: 80% !important;
    }
}
