* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0f0f0f;
    --card-bg: #121212;
    --text-primary: #f5f0e6;
    --text-secondary: #b8a88a;
    --border-color: rgba(212, 175, 55, 0.22);
    --accent-primary: #D4AF37;
    --accent-secondary: #FFD700;
    --accent-blue: #C5A059;
    --glow-color: #FFD700;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.12), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.08), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(197, 160, 89, 0.06), transparent 55%),
        linear-gradient(to bottom, #000000, #0a0806);
    padding: 60px 20px;
    position: relative;
}

.page-container {
    max-width: 480px;
    margin: 0 auto;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
}

.sun-icon {
    display: none;
}

body.dark .moon-icon {
    display: none;
}

body.dark .sun-icon {
    display: block;
}

/* Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 1.5px;
    height: 1.5px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Header Card */
.header-section {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.95), rgba(12, 10, 6, 0.95));
    border-radius: 16px;
    padding: 32px 28px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-primary), 
        var(--accent-secondary),
        var(--accent-blue),
        transparent);
    border-radius: 16px 16px 0 0;
    box-shadow: 
        0 0 30px var(--accent-primary), 
        0 0 20px var(--accent-secondary);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 30px var(--accent-primary), 
            0 0 20px var(--accent-secondary);
    }
    50% { 
        box-shadow: 
            0 0 50px var(--accent-primary), 
            0 0 40px var(--accent-secondary);
    }
}

.logo-wrapper {
    width: min(100%, 280px);
    height: auto;
    margin: 0 auto 20px;
    position: relative;
}

.logo-glow {
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25), transparent 70%);
    filter: blur(12px);
    z-index: 0;
}

.logo {
    width: 100%;
    height: auto;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 1;
    object-fit: contain;
}

.company-name {
    font-family: 'Playfair Display', 'Tajawal', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FFD700, #D4AF37, #C5A059);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.35));
}

.typewriter {
    border-right: none;
    padding-right: 0;
}

.company-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
}

/* Content Section */
.content-section {
    max-width: 600px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Link Cards - Beautiful Modern Style */
.link-card {
    display: flex;
    align-items: center;
    padding: 22px 26px;
    background: 
        linear-gradient(135deg, rgba(18, 18, 18, 0.85), rgba(24, 20, 12, 0.85)),
        linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 215, 0, 0.06));
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(212, 175, 55, 0.15);
    min-height: 80px;
    gap: 18px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Animated gradient border */
.link-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.6),
        rgba(255, 215, 0, 0.6),
        rgba(197, 160, 89, 0.6),
        rgba(212, 175, 55, 0.6)
    );
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Glow effect */
.link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 0% 50%, rgba(212, 175, 55, 0.15), transparent 70%),
        radial-gradient(circle at 100% 50%, rgba(255, 215, 0, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.link-card:hover {
    transform: translateY(-4px) scale(1.015);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 
        0 8px 32px rgba(212, 175, 55, 0.2),
        0 4px 16px rgba(255, 215, 0, 0.1);
    background: 
        linear-gradient(135deg, rgba(12, 12, 12, 0.95), rgba(20, 16, 8, 0.95)),
        linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255, 215, 0, 0.08));
}

.link-card:hover::before {
    opacity: 1;
}

.link-card:hover::after {
    opacity: 1;
}

/* Icon Styles */
.link-icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.link-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 215, 0, 0.15));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.link-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.link-card:hover .link-icon-wrapper {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.link-card:hover .link-icon-wrapper::before {
    opacity: 1;
}

.link-icon-wrapper svg {
    width: 26px;
    height: 26px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.link-card:hover .link-icon-wrapper svg {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Specific icon colors using classes */
.link-icon-wrapper svg {
    color: var(--text-secondary);
}

/* WhatsApp Icon - Green */
.link-icon-wrapper.icon-whatsapp {
    background: linear-gradient(135deg, #25D366, #20BA5A) !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
}

.link-icon-wrapper.icon-whatsapp svg {
    color: white !important;
}

/* Instagram Icon - Gradient */
.link-icon-wrapper.icon-instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
    box-shadow: 0 2px 12px rgba(188, 24, 136, 0.3) !important;
}

.link-icon-wrapper.icon-instagram svg {
    color: white !important;
}

/* YouTube Icon - Red */
.link-icon-wrapper.icon-youtube {
    background: #FF0000 !important;
    box-shadow: 0 2px 12px rgba(255, 0, 0, 0.3) !important;
}

.link-icon-wrapper.icon-youtube svg {
    color: white !important;
}

/* Facebook Icon - Blue */
.link-icon-wrapper.icon-facebook {
    background: #1877F2 !important;
    box-shadow: 0 2px 12px rgba(24, 119, 242, 0.3) !important;
}

.link-icon-wrapper.icon-facebook svg {
    color: white !important;
}

/* TikTok Icon - Black */
.link-icon-wrapper.icon-tiktok {
    background: #000000 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
}

.link-icon-wrapper.icon-tiktok svg {
    color: white !important;
}

/* Website Icon - Globe Gradient */
.link-icon-wrapper.icon-website {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #C5A059 100%) !important;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.4) !important;
}

.link-icon-wrapper.icon-website svg {
    color: white !important;
    stroke: white !important;
}

.link-content {
    flex: 1;
    min-width: 0;
    text-align: right;
    position: relative;
    z-index: 2;
}

.link-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    transition: all 0.3s ease;
    letter-spacing: -0.3px;
}

.link-card:hover .link-content h3 {
    color: var(--accent-secondary);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.link-arrow {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 215, 0, 0.2));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.link-card:hover .link-arrow {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    transform: scale(1.08) rotate(-30deg);
    box-shadow: 
        0 0 25px rgba(212, 175, 55, 0.5),
        0 0 15px rgba(255, 215, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    border-color: var(--accent-secondary);
}

.link-arrow svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transform: rotate(180deg);
    transition: all 0.4s ease;
}

.link-card:hover .link-arrow svg {
    color: white;
    transform: rotate(180deg) scale(1.2);
}

.hover-indicator {
    display: none;
}

/* QR Code Section - Desktop */
.qr-section {
    flex: 0 0 200px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: block;
}

/* QR Code Section - Mobile */
.qr-section-mobile {
    display: none;
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.qr-card {
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(24, 20, 12, 0.9));
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.qr-card:hover {
    box-shadow: 
        0 0 25px rgba(212, 175, 55, 0.4),
        0 0 15px rgba(255, 215, 0, 0.2);
    border-color: var(--accent-primary);
}

.qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    width: 100%;
}

.qr-code canvas,
.qr-code img {
    display: block;
    width: 184px !important;
    height: 184px !important;
    border-radius: 8px;
}

.qr-label {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .qr-section {
        display: none;
    }
    
    .qr-section-mobile {
        display: block;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 40px 16px;
    }
    
    .page-container {
        max-width: 100%;
    }
    
    .header-section {
        padding: 28px 24px;
    }
    
    .company-name {
        font-size: 1.35rem;
    }
    
    .link-card {
        padding: 14px;
        gap: 12px;
    }
    
    .link-content h3 {
        font-size: 0.95rem;
    }
    
    .qr-card {
        width: 100%;
    }
    
    .qr-code canvas {
        width: 180px !important;
        height: 180px !important;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.link-card {
    animation: slideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }
.link-card:nth-child(7) { animation-delay: 0.35s; }

/* Pulse effect for icons */
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.link-card:hover .link-icon-wrapper {
    animation: iconPulse 2s ease-in-out infinite;
}

/* Light Mode */
body.light {
    background: linear-gradient(to bottom, #faf8f3, #f5f0e6);
}

body.dark .qr-card {
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
}

body.dark .qr-card:hover {
    box-shadow: 0 16px 48px rgba(255, 215, 0, 0.3);
}

body.light .header-section,
body.light .qr-card {
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

body.light .link-card {
    background: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

body.light .link-card:hover {
    background: #faf8f3;
    border-color: rgba(212, 175, 55, 0.4);
}

body.light .company-name {
    background: linear-gradient(135deg, #B8860B, #D4AF37, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light .link-content h3 {
    color: #1a1a1a;
}

body.light .company-desc,
body.light .footer a {
    color: #6b5b3d;
}

body.light .link-arrow svg {
    color: #8b7355;
}

body.light .theme-toggle {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.25);
}

body.light .theme-toggle:hover {
    background: rgba(212, 175, 55, 0.15);
}

body.light .theme-toggle svg {
    color: #B8860B;
}
