/* Modern Button Styles */

/* Neon Button */
.btn-neon {
    position: relative;
    padding: 15px 30px;
    background: transparent;
    color: #00ff88;
    border: 2px solid #00ff88;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    z-index: 1;
}

.btn-neon:hover {
    color: #000;
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
    transition-delay: 0.1s;
}

.btn-neon:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid #00ff88;
    border-left: 2px solid #00ff88;
    transition: 0.5s;
}

.btn-neon:hover:before {
    width: 100%;
    height: 100%;
}

.btn-neon:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #00ff88;
    border-right: 2px solid #00ff88;
    transition: 0.5s;
}

.btn-neon:hover:after {
    width: 100%;
    height: 100%;
}

/* Glitch Button */
.btn-glitch {
    position: relative;
    padding: 15px 30px;
    background: #ff0055;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

.btn-glitch:before {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    top: -2px;
    width: 100%;
    height: 100%;
    background: #00ffff;
    color: white;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.btn-glitch:hover {
    background: #ff0066;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.5);
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    10% { clip: rect(112px, 9999px, 76px, 0); }
    20% { clip: rect(85px, 9999px, 77px, 0); }
    30% { clip: rect(27px, 9999px, 97px, 0); }
    40% { clip: rect(64px, 9999px, 98px, 0); }
    50% { clip: rect(61px, 9999px, 85px, 0); }
    60% { clip: rect(99px, 9999px, 114px, 0); }
    70% { clip: rect(34px, 9999px, 115px, 0); }
    80% { clip: rect(98px, 9999px, 129px, 0); }
    90% { clip: rect(43px, 9999px, 96px, 0); }
    100% { clip: rect(82px, 9999px, 64px, 0); }
}

/* Cyberpunk Button */
.btn-cyber {
    position: relative;
    padding: 15px 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
}

.btn-cyber:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 3s infinite;
}

.btn-cyber:after {
    content: '';
    position: absolute;
    left: -5px;
    top: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #0ff;
    animation: border-animation 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

@keyframes border-animation {
    0% { border-color: #0ff; }
    50% { border-color: #f0f; }
    100% { border-color: #0ff; }
}

/* Liquid Button */
.btn-liquid {
    position: relative;
    padding: 15px 30px;
    background: #4973ff;
    color: white;
    border: none;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-liquid span {
    position: relative;
    z-index: 1;
}

.btn-liquid:before {
    content: "";
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 0;
    height: 0;
    background: radial-gradient(circle, #7695ff 0%, #4973ff 100%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.5s, height 0.5s;
}

.btn-liquid:hover:before {
    width: 300px;
    height: 300px;
}

/* 3D Button */
.btn-3d {
    position: relative;
    padding: 15px 30px;
    background: #ff3366;
    color: white;
    border: none;
    border-radius: 5px;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg);
    transition: 0.3s;
}

.btn-3d:before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: #cc2952;
    transform-origin: top;
    transform: rotateX(-90deg);
}

.btn-3d:hover {
    transform: perspective(1000px) rotateX(20deg);
}

/* Holographic Button */
.btn-holo {
    position: relative;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
}

.btn-holo:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: 0.6s;
}

.btn-holo:hover:before {
    transform: translateX(100%);
}

.btn-holo:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Rainbow Button */
.btn-rainbow {
    position: relative;
    padding: 15px 30px;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff);
    background-size: 700%;
    color: white;
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    animation: rainbow 8s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.btn-rainbow:hover {
    animation: rainbow 1s linear infinite;
}

/* Matrix Button */
.btn-matrix {
    position: relative;
    padding: 15px 30px;
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
}

.btn-matrix:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0;
    opacity: 0;
    transition: 0.3s;
}

.btn-matrix:hover {
    color: #000;
}

.btn-matrix:hover:before {
    opacity: 1;
}

.btn-matrix span {
    position: relative;
    z-index: 1;
}

/* Apply different button styles to different sections */
#youtube-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: transparent;
    color: #00ff88;
    border: 2px solid #00ff88;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    z-index: 1;
}

#youtube-tools .btn-primary:hover {
    color: #000;
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
}

#image-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: #ff0055;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

#image-tools .btn-primary:before {
    content: attr(data-text);
    position: absolute;
    left: -2px;
    top: -2px;
    width: 100%;
    height: 100%;
    background: #00ffff;
    color: white;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

#creative-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
}

#creative-tools .btn-primary:before {
    content: '';
    position: absolute;
    left: -5px;
    top: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #0ff;
    animation: border-animation 3s infinite;
}

#text-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: #4973ff;
    color: white;
    border: none;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

#text-tools .btn-primary:before {
    content: "";
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 0;
    height: 0;
    background: radial-gradient(circle, #7695ff 0%, #4973ff 100%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.5s, height 0.5s;
}

#utility-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: #ff3366;
    color: white;
    border: none;
    border-radius: 5px;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg);
    transition: 0.3s;
}

#utility-tools .btn-primary:before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: #cc2952;
    transform-origin: top;
    transform: rotateX(-90deg);
}

#development-tools .btn-primary {
    position: relative;
    padding: 15px 30px;
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
}

#development-tools .btn-primary:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0;
    opacity: 0;
    transition: 0.3s;
}

#development-tools .btn-primary:hover {
    color: #000;
}

#development-tools .btn-primary:hover:before {
    opacity: 0.1;
}

/* Animations */
@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    10% { clip: rect(112px, 9999px, 76px, 0); }
    20% { clip: rect(85px, 9999px, 77px, 0); }
    30% { clip: rect(27px, 9999px, 97px, 0); }
    40% { clip: rect(64px, 9999px, 98px, 0); }
    50% { clip: rect(61px, 9999px, 85px, 0); }
    60% { clip: rect(99px, 9999px, 114px, 0); }
    70% { clip: rect(34px, 9999px, 115px, 0); }
    80% { clip: rect(98px, 9999px, 129px, 0); }
    90% { clip: rect(43px, 9999px, 96px, 0); }
    100% { clip: rect(82px, 9999px, 64px, 0); }
}

@keyframes border-animation {
    0% { border-color: #0ff; }
    50% { border-color: #f0f; }
    100% { border-color: #0ff; }
}

/* Button hover effects */
.btn-primary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 150px;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

/* Tool card hover effects */
.tool-card:hover .btn-primary {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tool-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: scale(0.8); /* 20% smaller */
    margin: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tool-card:hover {
    transform: scale(0.82);
    border-color: rgba(74, 144, 226, 0.3);
    box-shadow: 0 12px 40px rgba(74, 144, 226, 0.2);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.tool-card:hover::before {
    transform: translateX(100%);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.tool-icon::after {
    content: '';
    position: absolute;
    width: 2rem;
    height: 2rem;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1), transparent);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #2c3e50;
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.tool-button {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.tool-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.tool-button:hover::before {
    transform: translateX(100%);
}
