:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e1b4b;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #f43f5e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2));
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background floating orbs */
.background-animation {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.background-animation::before,
.background-animation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.background-animation::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.background-animation::after {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    z-index: 10;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

header h1 span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    gap: 10px;
    position: relative;
}

input[type="url"] {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="url"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

input[type="url"]::placeholder {
    color: var(--text-muted);
}

button {
    padding: 0 30px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.hidden {
    display: none !important;
}

.error-msg {
    color: var(--error);
    margin-top: 10px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.result-area {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.result-area h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.result-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--primary);
}

.short-url {
    color: #a78bfa;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    word-break: break-all;
    transition: color 0.2s;
}

.short-url:hover {
    color: white;
    text-decoration: underline;
}

.copy-btn {
    background: transparent;
    padding: 10px;
    min-width: auto;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: none;
    transform: none;
}

.feedback-msg {
    margin-top: 10px;
    color: var(--success);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.feedback-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
    }
    
    button {
        padding: 16px;
    }
    
    .glass-card {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}
