
@keyframes starFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Keep your existing star color classes */

/* Enhanced Twinkling Stars Animation */
@keyframes twinkle {
    0% {
        opacity: 0.1;
        transform: scale(0.4);
        filter: blur(0.8px);
    }
    25% {
        opacity: 0.7;
        transform: scale(0.8);
        filter: blur(0.3px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        filter: blur(0px);
    }
    75% {
        opacity: 0.7;
        transform: scale(0.9);
        filter: blur(0.2px);
    }
    100% {
        opacity: 0.1;
        transform: scale(0.4);
        filter: blur(0.8px);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    20% {
        transform: translateY(-7px) translateX(4px);
    }
    40% {
        transform: translateY(-3px) translateX(8px);
    }
    60% {
        transform: translateY(2px) translateX(5px);
    }
    80% {
        transform: translateY(7px) translateX(1px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 8px var(--primary), 0 0 15px var(--secondary);
    }
    33% {
        box-shadow: 0 0 15px var(--primary), 0 0 25px var(--secondary);
    }
    66% {
        box-shadow: 0 0 10px var(--primary), 0 0 30px var(--secondary);
    }
    100% {
        box-shadow: 0 0 8px var(--primary), 0 0 15px var(--secondary);
    }
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0) rotate(15deg);
        opacity: 1;
        height: 3px;
        width: 5px;
    }
    20% {
        height: 10px;
        width: 8px;
    }
    60% {
        height: 30px;
        opacity: 0.8;
    }
    100% {
        transform: translateX(800px) translateY(400px) rotate(45deg);
        opacity: 0;
        height: 60px;
    }
}

.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary), 0 0 15px var(--secondary);
    z-index: -1;
    filter: blur(0.3px);
}

/* Static stars have a subtle animation */
.star.static {
    opacity: 0.7;
    animation: pulse 5s infinite ease-in-out;
}

/* Floating stars move slowly in space */
.star.floating {
    animation: 
        twinkle var(--twinkle-duration, 3s) infinite ease-in-out,
        float var(--float-duration, 18s) infinite ease-in-out;
}

/* Shooting stars move across the screen */
.star.shooting {
    position: absolute;
    width: 5px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), #fff 20%, rgba(255,255,255,0.8) 40%, rgba(255,255,255,0.1));
    border-radius: 0;
    animation: shooting var(--shooting-duration, 1.8s) linear forwards;
    opacity: 1;
    transform-origin: center center;
    box-shadow: 0 0 25px #fff, 0 0 50px var(--primary), 0 0 15px var(--secondary);
}

.star.star-purple {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

.star.star-teal {
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary), 0 0 20px var(--secondary);
}

.star.star-orange {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.star.star-blue {
    background-color: #0ff;
    box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

.star.star-pink {
    background-color: #f0f;
    box-shadow: 0 0 10px #f0f, 0 0 20px #f0f;
}

.star.star-teal {
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary), 0 0 20px var(--secondary);
}

.star.star-orange {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(10, 10, 27, 0.8) 0%, rgba(5, 5, 20, 0.95) 50%, rgba(1, 1, 10, 1) 100%);
}

/* Enhanced shooting stars with varied trajectories */

/* Animation Utilities */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Applied Animations */

/* Navigation Item Hover */
.nav-item {
    position: relative;
    overflow: hidden;
}

.nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Button Animations */
.add-website-btn {
    position: relative;
    overflow: hidden;
}

.add-website-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.add-website-btn:hover::after {
    width: 300%;
    height: 300%;
}

.add-website-btn i {
    transition: transform 0.3s ease;
}

.add-website-btn:hover i {
    transform: rotate(90deg);
}

/* Card Hover Effects */
.website-card {
    position: relative;
    overflow: hidden;
}

.website-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, transparent 50%, rgba(124, 58, 237, 0.05) 100%);
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 1;
}

.website-card:hover::before {
    opacity: 1;
}

.website-card .website-info {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.website-card:hover .website-info {
    transform: translateY(-5px);
}

.website-card .website-thumbnail img {
    transition: transform 0.5s ease;
}

.website-card:hover .website-thumbnail img {
    transform: scale(1.1);
}

/* Favorite Button Animation */
.website-favorite {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.website-favorite:hover {
    transform: scale(1.2);
}

.website-favorite.active {
    animation: pulse 0.5s ease;
}

/* Dropdown Animation */
.dropdown-content {
    transform-origin: top right;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease, display 0s linear 0.2s;
}

.dropdown:hover .dropdown-content {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Modal Animations */
.modal.show .modal-content {
    animation: slideInUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-closing .modal-content {
    animation: fadeOut 0.3s ease forwards;
    transform: scale(0.95);
}

/* Toast Notification Animation */
.toast {
    animation: slideInRight 0.5s ease forwards;
}

.toast.hiding {
    animation: slideOutRight 0.5s ease forwards;
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--background-card), 
        var(--background-modal), 
        var(--background-card));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Empty State Animation */
.empty-state svg {
    animation: bounce 2s infinite;
}

/* Menu Toggle Animation */
.menu-toggle span {
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Grid/List View Transition */
.websites-container {
    transition: grid-template-columns 0.3s ease;
}

.website-card {
    animation: fadeIn 0.5s ease;
}

/* Sidebar Collapse Animation */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .logo h1,
.sidebar .nav-item span,
.sidebar .theme-toggle span,
.sidebar .settings span {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar-collapsed .logo h1,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .theme-toggle span,
.sidebar-collapsed .settings span {
    opacity: 0;
    transform: translateX(-20px);
}

/* Navigation Icon Animation */
.nav-item i {
    transition: transform 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.2);
}

/* Search Bar Animation */
.mega-search-bar {
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mega-search-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(0, 255, 0, 0.1), 
        transparent
    );
    pointer-events: none;
    transition: 0.5s;
}

.mega-search-bar:focus-within::after {
    left: 100%;
}

.mega-search-bar:focus-within {
    box-shadow: 0 0 30px var(--primary);
    border-color: var(--primary);
    transform: scale(1.02);
}

.mega-search-bar input {
    transition: all 0.3s ease;
}

.mega-search-bar:focus-within input {
    color: var(--primary);
}

.mega-search-bar i {
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.mega-search-bar:focus-within i {
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--primary);
}

.search-bar {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--primary-light);
    border-color: var(--primary);
}

.search-bar input {
    transition: transform 0.3s ease;
}

.search-bar:focus-within input {
    transform: translateX(5px);
}

.search-bar i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.search-bar:focus-within i {
    transform: scale(1.1);
    color: var(--primary);
}

/* Form Inputs Animation */
.form-group input:not([type="checkbox"]),
.form-group select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.form-group input:focus:not([type="checkbox"]),
.form-group select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Add Website Animation */
@keyframes addWebsite {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.website-card.new {
    animation: addWebsite 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Delete Website Animation */
@keyframes deleteWebsite {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

.website-card.deleting {
    animation: deleteWebsite 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

/* Category Tag Animation */
.website-category {
    position: relative;
    overflow: hidden;
}

.website-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

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

/* Contact Section Animations */
.contact-header h1 {
    animation: fadeIn 0.8s ease-out forwards, slideInUp 0.8s ease-out forwards;
}

.contact-header p {
    animation: fadeIn 1s ease-out 0.3s forwards, slideInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.contact-card {
    animation: fadeIn 1.2s ease-out forwards;
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.contact-cards .contact-card:nth-child(1) {
    animation-delay: 0.4s;
}

.contact-cards .contact-card:nth-child(2) {
    animation-delay: 0.6s;
}

.contact-cards .contact-card:nth-child(3) {
    animation-delay: 0.8s;
}

.contact-cards .contact-card:nth-child(4) {
    animation-delay: 1s;
}

.social-links {
    animation: fadeIn 1.5s ease-out 1.2s forwards;
    opacity: 0;
}

.social-links a {
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.contact-card-icon {
    animation: float 4s ease-in-out infinite;
}

.website-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    border-color: transparent;
    border-image: var(--gradient-1);
    border-image-slice: 1;
}