@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #8a2be2;
    --secondary: #4b0082;
    --accent: #ffd700;
    --light: #e6e6fa;
    --dark: #1a1a2e;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--dark), var(--secondary));
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Particle JS Canvas */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Main Container */
.magic-container {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.7);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
}

/* Anime Character */
.anime-character {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="20" fill="%23FFD700"/><circle cx="40" cy="25" r="3" fill="%231A1A2E"/><circle cx="60" cy="25" r="3" fill="%231A1A2E"/><path d="M45 40 Q50 45 55 40" stroke="%231A1A2E" stroke-width="2" fill="none"/><path d="M30 60 Q50 80 70 60" stroke="%23FFD700" stroke-width="5" fill="none"/></svg>') no-repeat;
    opacity: 0.8;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

/* Form Elements */
.magic-input {
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.magic-input:focus {
    background: rgba(26, 26, 46, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    color: var(--light);
}

.magic-input::placeholder {
    color: rgba(230, 230, 250, 0.6);
}

.magic-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    color: var(--light);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.magic-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.6);
}

.magic-btn:active {
    transform: translateY(1px);
}

.magic-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.magic-btn:hover::after {
    left: 100%;
    top: 100%;
}

/* Runes */
.magic-runes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.rune {
    position: absolute;
    font-size: 24px;
    color: var(--accent);
    animation: float 4s ease-in-out infinite;
}

/* Links */
.magic-link {
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.magic-link:hover {
    color: var(--light);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.magic-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: all 0.3s ease;
}

.magic-link:hover::after {
    width: 100%;
}

/* Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--light);
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background: linear-gradient(45deg, #ffd700, #ffa500);
}

input:checked+.slider:before {
    transform: translateX(30px);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }

    100% {
        text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .anime-character {
        width: 200px;
        height: 200px;
        right: -30px;
        bottom: -30px;
    }

    .magic-container {
        margin: 20px;
        padding: 20px;
    }
}