* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-bg: #0a0e27;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 3D Card Animation on Load */
.card-3d {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(90deg) translateY(100px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: perspective(1000px) rotateX(-10deg) translateY(-20px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
    }
}

/* Glitch effect on title */
.title-3d {
    position: relative;
    animation: titleGlitch 0.3s ease-out;
    animation-delay: 2.5s;
}

@keyframes titleGlitch {
    0%, 100% { transform: translateZ(30px) translateX(0); }
    10% { transform: translateZ(30px) translateX(-2px); }
    20% { transform: translateZ(30px) translateX(2px); }
    30% { transform: translateZ(30px) translateX(-1px); }
    40% { transform: translateZ(30px) translateX(1px); }
    50% { transform: translateZ(30px) translateX(0); }
}

.container-3d {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.scene {
    width: 100%;
    max-width: 600px;
    position: relative;
}

/* Background 3D Shapes */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-gradient);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-gradient);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    right: -75px;
    animation-delay: 10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    bottom: 20%;
    left: -90px;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* 3D Card */
.card-3d {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    z-index: 1;
}

.card-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
}

.card-front {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform-style: preserve-3d;
    position: relative;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    padding: 2px;
    background: var(--primary-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    z-index: -1;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 20px;
    transform: translateZ(50px);
}

/* Title */
.title-3d {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    transform: translateZ(30px);
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    transform: translateZ(20px);
}

/* Form */
.form-3d {
    margin-bottom: 30px;
}

.input-group-3d {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    transform: translateZ(20px);
}

.input-group-3d input {
    flex: 1;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.input-group-3d input:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.input-group-3d input::placeholder {
    color: var(--text-secondary);
}

/* Button 3D */
.btn-3d {
    padding: 18px 35px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-3d:hover {
    transform: translateY(-3px) rotateX(5deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-3d:active {
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Result */
.result-3d {
    margin-top: 30px;
    padding: 25px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    transform: translateZ(30px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) translateZ(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(30px);
    }
}

.result-label {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.short-url-container {
    display: flex;
    gap: 10px;
}

.short-url-container input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.btn-copy {
    padding: 15px 25px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-copy:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

/* Statistics */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    transform: translateZ(20px);
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.stat-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Admin Link */
.admin-link {
    text-align: center;
    margin-top: 30px;
    transform: translateZ(10px);
}

.admin-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link a:hover {
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .title-3d {
        font-size: 2rem;
    }
    
    .card-front {
        padding: 30px 20px;
    }
    
    .input-group-3d {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Mouse movement effect */
.card-3d {
    transition: transform 0.1s ease-out;
}

