/* Update background colors for better harmony */
body {
    background: linear-gradient(135deg, 
    #000000 0%, #1c1b1b 50%, #Ff8500 50.1%, #191616 50.2%,
    #Ff8500 50.3%, #191616 50.4%, #Ff8500 50.5%, #191616 50.6%);
    min-height: 100vh;
}

/* Custom properties for the border animation */
@property --border-angle-1 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 0deg;
}

@property --border-angle-2 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 90deg;
}

@property --border-angle-3 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 180deg;
}

@property --border-angle-4 {
    syntax: '<angle>';
    inherits: true;
    initial-value: 270deg;
}

/* Card hover effect with animated border */
.card {
    position: relative;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border: 1px solid #2a2a2a;
    z-index: 1;
    transition: all 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(
        from var(--border-angle-1) at 0% 0%,
        transparent,
        var(--color-glow-start),
        var(--color-glow-end),
        transparent 25%,
        transparent
    ),
    conic-gradient(
        from var(--border-angle-2) at 100% 0%,
        transparent,
        var(--color-glow-start),
        var(--color-glow-end),
        transparent 25%,
        transparent
    ),
    conic-gradient(
        from var(--border-angle-3) at 100% 100%,
        transparent,
        var(--color-glow-start),
        var(--color-glow-end),
        transparent 25%,
        transparent
    ),
    conic-gradient(
        from var(--border-angle-4) at 0% 100%,
        transparent,
        var(--color-glow-start),
        var(--color-glow-end),
        transparent 25%,
        transparent
    );
    border-radius: 1rem;
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s ease;
    animation: rotateBorder 3s linear infinite paused;
}

.card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@keyframes rotateBorder {
    0% {
        --border-angle-1: 0deg;
        --border-angle-2: 90deg;
        --border-angle-3: 180deg;
        --border-angle-4: 270deg;
    }
    100% {
        --border-angle-1: 360deg;
        --border-angle-2: 450deg;
        --border-angle-3: 540deg;
        --border-angle-4: 630deg;
    }
}

/* Card content styles */
.card-img {
    aspect-ratio: 1496 / 869;
    position: relative;
    overflow: hidden;
}

.card-img img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover .card-img img {
    transform: scale(1.05) rotate(0.5deg);
}

/* Shadow and glow effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 133, 0, 0.1),
        0 0 100px rgba(29, 94, 221, 0.05);
    z-index: 10;
}

/* Color variables for the border glow */
:root {
    --color-glow-start: #ff8500;
    --color-glow-end: #1d5edd;
}

/* Update header background for better contrast */
header {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Social bar gradient */
.bg-dark-2 {
    background: linear-gradient(90deg, #111111 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 133, 0, 0.1);
}

/* Footer gradient */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .card::before {
        filter: blur(4px);
    }
}

@media screen and (max-width: 650px) {
    .container {
        max-width: 400px !important;
    }
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card content hover effect */
.card > div:last-child {
    position: relative;
    z-index: 2;
}

/* Ensure proper stacking context */
.card {
    isolation: isolate;
}

/* Fallback for browsers that don't support @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .card::before {
        background: linear-gradient(
            45deg,
            transparent 0%,
            var(--color-glow-start) 25%,
            var(--color-glow-end) 50%,
            transparent 75%
        );
        animation: slideBorder 2s linear infinite paused;
    }
    
    @keyframes slideBorder {
        0% {
            background-position: -200% -200%;
        }
        100% {
            background-position: 200% 200%;
        }
    }
}