/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Blu-Viola Cyberpunk Theme */
    --bg-color: #07071a;
    --text-primary: #00d4ff;
    --text-secondary: #a78bfa;
    --accent-color: #00d4ff;
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(0, 212, 255, 0.5);
    --accent-glow-violet: rgba(167, 139, 250, 0.5);
    --card-bg: rgba(0, 212, 255, 0.04);
    --card-border: rgba(0, 212, 255, 0.18);
    --hover-bg: rgba(0, 212, 255, 0.08);
    --terminal-bg: rgba(7, 7, 26, 0.95);

    /* Fixed vars (previously undefined) */
    --white: #e8f4ff;
    --text-dark: #07071a;
    --primary-color: #00d4ff;
    --primary-light: #a78bfa;

    --shadow-sm: 0 0 10px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 0 20px rgba(0, 212, 255, 0.2);
    --shadow-lg: 0 0 30px rgba(0, 212, 255, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Syne', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
        /* dot grid */
        radial-gradient(circle, rgba(0, 212, 255, 0.18) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
}

/* Scan effect blu-viola */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(transparent 50%, rgba(0, 212, 255, 0.03) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    animation: scan 8s linear infinite;
    z-index: 0;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* Background Animato */
.background-gradient {
    display: none;
}

/* Container */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Animazione Fade In */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sezione Profilo */
.profile-section {
    text-align: center;
    margin-bottom: 32px;
}

.profile-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 28px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 30px var(--accent-glow);
    transition: var(--transition);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow); }
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--accent-glow);
}

.profile-image-wrapper::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: var(--accent-color);
    border-right-color: var(--accent-secondary);
    opacity: 0.8;
    animation: rotate 4s linear infinite;
    box-shadow: 0 0 12px var(--accent-glow);
}

.profile-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 212, 255, 0.2);
    animation: rotate 12s linear infinite reverse;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-name {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0, 212, 255, 0.3);
    min-height: 44px;
    letter-spacing: -0.5px;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.profile-bio {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

/* =============================================================================
   SEARCH BAR
   ============================================================================= */

.search-container {
    max-width: 500px;
    margin: 0 auto 32px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.search-clear {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.search-clear:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
}

.search-results-count {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Highlight sul testo cercato */
.search-highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(167, 139, 250, 0.2));
    color: var(--accent-color);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.05);
    color: var(--text-secondary);
    font-size: 20px;
    text-decoration: none;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.social-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.social-icon i {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-4px);
    color: var(--bg-color);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.35);
}

.social-icon:hover::after {
    opacity: 1;
}

/* Colori specifici social */
.social-icon.instagram::after {
    background: linear-gradient(135deg, #833AB4, #FD1D1D, #FCB045);
}

.social-icon.youtube::after {
    background: #FF0000;
}

.social-icon.tiktok::after {
    background: linear-gradient(135deg, #00F2EA, #FF0050);
}

.social-icon.email::after {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
}

/* Sezioni */
.links-section,
.support-section {
    margin-bottom: 40px;
}

/* =============================================================================
   TAB BAR
   ============================================================================= */

.tab-container {
    margin-bottom: 40px;
}

.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
}

.tab-btn-active {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.25), inset 0 0 15px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.4);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

/* Tab Panel */
.tab-panel {
    display: none;
    animation: tabFadeIn 0.3s ease-out;
}

.tab-panel-active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tab bar */
@media (max-width: 640px) {
    .tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}


.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--accent-glow);
    opacity: 0.85;
}

/* Link Cards */
.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    width: 100%;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    /* Gradient blu-viola per hover sweep */
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), rgba(167, 139, 250, 0.1), transparent);
    transition: left 0.5s;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow-md);
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.link-card:hover::before {
    left: 100%;
}

/* Link Card Featured con gradient blu-viola */
.link-card.featured {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(167, 139, 250, 0.1));
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 20px var(--shadow-md);
}

.link-card.featured .link-icon {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(167, 139, 250, 0.2));
    color: var(--accent-color);
}

.link-card.featured .link-title,
.link-card.featured .link-description,
.link-card.featured .link-arrow {
    color: var(--text-primary);
}

/* Link Card Support */
.link-card.support {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 179, 71, 0.1));
    color: var(--text-primary);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.link-card.support .link-icon {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

.link-card.support .link-title,
.link-card.support .link-description,
.link-card.support .link-arrow {
    color: var(--text-primary);
}

/* Link Card Deal (affiliate) — Golden/Amber accent */
.link-card.deal {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08), rgba(255, 215, 0, 0.05));
    color: var(--text-primary);
    border: 1px solid rgba(255, 179, 71, 0.3);
}

.link-card.deal:hover {
    border-color: rgba(255, 179, 71, 0.6);
    box-shadow: 0 0 20px rgba(255, 179, 71, 0.15);
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.12), rgba(255, 215, 0, 0.08));
}

.link-card.deal .link-icon {
    background: rgba(255, 179, 71, 0.15);
    color: #FFB347;
    border-color: rgba(255, 179, 71, 0.3);
}

.link-card.deal .link-title,
.link-card.deal .link-description,
.link-card.deal .link-arrow {
    color: var(--text-primary);
}

.link-card.deal .discount-badge {
    background: linear-gradient(135deg, #FFB347, #FF6B6B);
    color: #0a0a1f;
    box-shadow: 0 0 10px rgba(255, 179, 71, 0.3);
}

/* Link Icon */
.link-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color);
    transition: var(--transition);
    overflow: hidden;
}

/* Immagine come icona */
.link-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.link-card:hover .link-icon {
    transform: rotate(5deg) scale(1.1);
}

/* Link Content */
.link-content {
    flex: 1;
}

.link-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.link-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

/* Link Arrow */
.link-arrow {
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
    color: var(--accent-color);
}

/* Hide arrow when share button is visible */
.link-wrapper:hover .link-arrow {
    opacity: 0;
    pointer-events: none;
}

/* Discount Badge */
.discount-badge {
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Schedule Badge */
.schedule-badge {
    display: inline-block;
    background: rgba(255, 179, 71, 0.2);
    color: #FFB347;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    border: 1px solid rgba(255, 179, 71, 0.3);
}

/* Link Inattivo (schedulato per dopo) */
.link-inactive {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.link-inactive .link-icon,
.link-inactive .link-card-grid-icon {
    filter: grayscale(70%);
}

/* =============================================================================
   SHARE BUTTONS
   ============================================================================= */

/* Wrapper per link + share button */
.link-wrapper {
    position: relative;
    margin-bottom: 12px;
}

/* Share button - vista lista */
.share-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    z-index: 10;
    opacity: 0;
}

.link-wrapper:hover .share-btn {
    opacity: 1;
}

.share-btn:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.share-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.share-btn i {
    font-size: 14px;
}

/* Share button - vista card */
.share-btn-card {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    z-index: 10;
    opacity: 0;
}

.link-wrapper:hover .share-btn-card {
    opacity: 1;
}

.share-btn-card:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.share-btn-card:active {
    transform: scale(0.95);
}

.share-btn-card i {
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 24px 16px;
    }

    .profile-name {
        font-size: 26px;
    }

    .profile-bio {
        font-size: 15px;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .link-card {
        padding: 16px;
    }

    .link-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 18px;
    }

    .link-title {
        font-size: 15px;
    }

    .link-description {
        font-size: 13px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-header {
        gap: 8px;
    }

    .search-input {
        padding: 12px 44px 12px 44px;
        font-size: 13px;
    }

    .search-icon {
        left: 14px;
        font-size: 14px;
    }

    /* Share buttons su mobile: sempre visibili */
    .share-btn,
    .share-btn-card {
        opacity: 1;
    }

    .share-btn {
        width: 32px;
        height: 32px;
        right: 6px;
    }

    .share-btn-card {
        width: 32px;
        height: 32px;
    }

    .share-btn i,
    .share-btn-card i {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .link-card {
        padding: 14px;
        gap: 12px;
    }

    .link-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
    }
}

/* Animazioni al caricamento */
.link-wrapper {
    animation: slideIn 0.5s ease-out backwards;
}

.link-wrapper:nth-child(1) { animation-delay: 0.1s; }
.link-wrapper:nth-child(2) { animation-delay: 0.15s; }
.link-wrapper:nth-child(3) { animation-delay: 0.2s; }
.link-wrapper:nth-child(4) { animation-delay: 0.25s; }
.link-wrapper:nth-child(5) { animation-delay: 0.3s; }
.link-wrapper:nth-child(6) { animation-delay: 0.35s; }
.link-wrapper:nth-child(7) { animation-delay: 0.4s; }
.link-wrapper:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading State */
.link-card:active {
    transform: scale(0.98);
}

/* =============================================================================
   TOGGLE VISTA LISTA/CARD
   ============================================================================= */

.view-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.view-toggle-btn:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.view-toggle-btn:active {
    transform: scale(0.95);
}

.view-toggle-icon {
    font-size: 16px;
    color: var(--accent-color);
}

/* =============================================================================
   VISTA CARD/GRID
   ============================================================================= */

.links-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Vista grid: il wrapper non usa margin-bottom */
.links-grid-container .link-wrapper {
    margin-bottom: 0;
}

.link-card-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

.link-card-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), rgba(167, 139, 250, 0.1), transparent);
    transition: left 0.5s;
}

.link-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
    border-color: var(--accent-color);
    background: var(--hover-bg);
}

.link-card-grid:hover::before {
    left: 100%;
}

/* Card Grid Featured */
.link-card-grid.featured {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(167, 139, 250, 0.1));
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 20px var(--shadow-md);
}

.link-card-grid.featured .link-card-grid-icon {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(167, 139, 250, 0.2));
    color: var(--accent-color);
}

/* Card Grid Support */
.link-card-grid.support {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 179, 71, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.link-card-grid.support .link-card-grid-icon {
    background: rgba(255, 107, 107, 0.2);
    color: #FF6B6B;
}

/* Card Grid Deal (affiliate) */
.link-card-grid.deal {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.08), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 179, 71, 0.3);
}

.link-card-grid.deal:hover {
    border-color: rgba(255, 179, 71, 0.6);
    box-shadow: 0 0 20px rgba(255, 179, 71, 0.15);
}

.link-card-grid.deal .link-card-grid-icon {
    background: rgba(255, 179, 71, 0.15);
    color: #FFB347;
    border-color: rgba(255, 179, 71, 0.3);
}

.link-card-grid.deal .discount-badge {
    background: linear-gradient(135deg, #FFB347, #FF6B6B);
    color: #0a0a1f;
    box-shadow: 0 0 10px rgba(255, 179, 71, 0.3);
}

/* Card Grid Icon */
.link-card-grid-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent-color);
    margin-bottom: 16px;
    transition: var(--transition);
    overflow: hidden;
}

.link-card-grid-icon .link-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.link-card-grid:hover .link-card-grid-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Card Grid Content */
.link-card-grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-card-grid-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.link-card-grid-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    opacity: 0.8;
    line-height: 1.4;
}

/* Badge in card grid */
.link-card-grid .discount-badge {
    margin-right: 0;
    margin-top: 8px;
}

/* Animazioni per grid cards */
.link-card-grid {
    animation: slideInScale 0.5s ease-out backwards;
}

.link-card-grid:nth-child(1) { animation-delay: 0.1s; }
.link-card-grid:nth-child(2) { animation-delay: 0.15s; }
.link-card-grid:nth-child(3) { animation-delay: 0.2s; }
.link-card-grid:nth-child(4) { animation-delay: 0.25s; }
.link-card-grid:nth-child(5) { animation-delay: 0.3s; }
.link-card-grid:nth-child(6) { animation-delay: 0.35s; }
.link-card-grid:nth-child(7) { animation-delay: 0.4s; }
.link-card-grid:nth-child(8) { animation-delay: 0.45s; }

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

.link-card-grid:active {
    transform: scale(0.96);
}

/* =============================================================================
   RESPONSIVE GRID VIEW
   ============================================================================= */

@media (max-width: 640px) {
    .links-grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .link-card-grid {
        padding: 20px;
        min-height: 180px;
    }

    .link-card-grid-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .link-card-grid-title {
        font-size: 15px;
    }

    .link-card-grid-description {
        font-size: 13px;
    }

    .view-toggle-btn {
        width: 32px;
        height: 32px;
    }

    .view-toggle-icon {
        font-size: 14px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .links-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 901px) {
    .links-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}
