:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-glow: #3b82f688;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: #06b6d4;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Glassmorphism Container */
.container {
    width: 90%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
}

header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9rem;
}

label i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

textarea, input[type="text"] {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: #fff;
    font-family: 'Outfit', monospace; /* Monospace for better code/link readability */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea {
    min-height: 120px;
}

/* Button Styling */
.glow-on-hover {
    width: 100%;
    padding: 1rem;
    border: none;
    outline: none;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.glow-on-hover:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 12px;
}

.glow-on-hover:hover {
    transform: scale(1.02);
}

.glow-on-hover:hover:before {
    opacity: 0.7;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.glow-on-hover:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Output Section */
.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.output-group.hidden {
    display: none;
}

.output-group:not(.hidden) {
    display: block;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copy-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    float: right;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.copy-btn.copied {
    color: var(--success-color);
    border-color: var(--success-color);
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: #64748b;
    font-size: 0.8rem;
}
