:root {
    --app-bg: rgba(30, 41, 59, 0.7);
    --app-primary: #ec4899;
    /* Pink/Rose for TinyURL differentiation */
    --app-primary-hover: #db2777;
    --app-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: #0f172a;
    background-image:
        radial-gradient(at 0% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.main-card {
    background: var(--app-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--app-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    min-height: 400px;
    /* Slander than QR code probably */
    margin-top: 2rem;
}

.input-section,
.display-section {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.input-section {
    border-right: 1px solid var(--app-border);
}

.brand {
    margin-bottom: 3rem;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ec4899, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label,
.display-section label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--app-border);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

#shorten-btn {
    background: linear-gradient(135deg, var(--app-primary), #be185d);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

#shorten-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

#shorten-btn:active {
    transform: translateY(0);
}

/* Right Section */
.display-section {
    background: rgba(15, 23, 42, 0.3);
    position: relative;
    align-items: center;
    text-align: center;
}

.placeholder {
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#result-container {
    width: 100%;
    text-align: left;
}

.result-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.result-box input {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ec4899;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--app-border);
    color: white;
    min-width: 50px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#copy-btn:hover {
    background: white;
    color: black;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    border-top-color: #ec4899;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}

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

#loading {
    color: #ec4899;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
    }

    .input-section {
        border-right: none;
        border-bottom: 1px solid var(--app-border);
    }
}