* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary: #64748b;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.2;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(124, 58, 237, 0.1);
    transform: translateY(-3px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding-top: 100px;
    padding-bottom: 120px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* 3D Animation */
.animation-container {
    width: 100%;
    max-width: 600px;
    height: 400px;
    perspective: 1200px;
    position: relative;
}

.animation-scene {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: scene-rotate 25s infinite linear;
}

@keyframes scene-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.url-object {
    position: absolute;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
    transition: all 1s ease;
    transform-style: preserve-3d;
    overflow: hidden;
    padding: 0 20px;
}

.long-url {
    width: 500px;
    height: 80px;
    font-size: 1.2rem;
    transform: translateZ(100px) rotateY(0deg);
    animation: long-url-float 8s infinite ease-in-out;
}

@keyframes long-url-float {
    0%, 100% { transform: translateZ(100px) rotateY(0deg) translateY(0); }
    50% { transform: translateZ(100px) rotateY(0deg) translateY(-20px); }
}

.scissors {
    width: 100px;
    height: 100px;
    background: #ff6b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    transform: translateZ(200px) rotateY(90deg);
    animation: scissors-rotate 8s infinite ease-in-out;
    z-index: 10;
}

@keyframes scissors-rotate {
    0%, 100% { transform: translateZ(200px) rotateY(90deg) rotate(0deg); }
    25% { transform: translateZ(200px) rotateY(90deg) rotate(15deg); }
    50% { transform: translateZ(200px) rotateY(90deg) rotate(0deg); }
    75% { transform: translateZ(200px) rotateY(90deg) rotate(-15deg); }
}

.short-url {
    width: 300px;
    height: 60px;
    font-size: 1.5rem;
    transform: translateZ(100px) rotateY(180deg);
    animation: short-url-float 8s infinite ease-in-out 1s;
}

@keyframes short-url-float {
    0%, 100% { transform: translateZ(100px) rotateY(180deg) translateY(0); }
    50% { transform: translateZ(100px) rotateY(180deg) translateY(-20px); }
}

/* Stats Section */
.stats {
    background: var(--gradient);
    color: var(--white);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 30px 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Link Shortener */
.link-shortener {
    background-color: var(--white);
    position: relative;
}

.shortener-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.1);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.shortener-container:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

.shortener-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--gray);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    background-color: var(--white);
}

.form-group i {
    position: absolute;
    right: 20px;
    top: 50px;
    color: var(--primary);
    font-size: 1.2rem;
}

.result-container {
    margin-top: 40px;
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

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

.result-box {
    background-color: var(--white);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.short-url-result {
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
    flex: 1;
    min-width: 200px;
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(124, 58, 237, 0.4);
}

.copy-btn.copied {
    background: var(--success);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Error Message */
.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--error);
    display: none;
}

/* Features Section */
.features {
    background-color: var(--light);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

/* Steps Section */
.how-it-works {
    background-color: var(--white);
}

.steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 50px;
}

.steps::before {
    content: '';
    position: absolute;
    top: 100px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--gradient);
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    padding: 40px 25px;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    transition: var(--transition);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.step-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 25px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    display: inline-block;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-light);
    transform: translateY(-3px);
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--white);
    position: relative;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 📱 Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        justify-content: center;
        margin-top: 40px;
    }

    .steps {
        flex-direction: column;
    }

    .steps::before {
        display: none;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .shortener-container {
        padding: 30px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .steps {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .form-group input {
        font-size: 0.95rem;
    }

    .copy-btn {
        width: 100%;
        text-align: center;
    }

    .short-url-result {
        text-align: center;
        width: 100%;
    }
}
