:root {
    --primary: #FF9500;
    --primary-dark: #E08300;
    --primary-soft: #FFF4E5;
    --bg-gradient: linear-gradient(135deg, #FFF8E7 0%, #FFE9BC 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --error: #EF4444;
    --border: #F3F4F6;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin: 0;
    color: var(--text-main);
}

.background-decor {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,149,0,0.1) 0%, transparent 70%);
    z-index: -1;
}

.app-container { width: 100%; max-width: 480px; }

/* Hero Improvements */
.hero { text-align: center; margin-bottom: 2.5rem; }
.shiba-wrapper {
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 15px -3px rgba(255,149,0,0.2);
    transition: transform 0.3s ease;
}
.hero:hover .shiba-wrapper { transform: scale(1.1) rotate(5deg); }
.shiba-icon { width: 50px; height: 50px; }

.hero h1 { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: var(--text-main); 
    margin: 0;
    letter-spacing: -0.5px;
}
.badge {
    font-size: 0.8rem;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 99px;
    vertical-align: middle;
}
.hero p { margin-top: 0.5rem; color: var(--text-muted); font-weight: 600; }

/* Pro Card Styling */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.url-input-container {
    display: flex;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.url-input-container:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.1);
}

.protocol-dropdown {
    background: transparent;
    border: none;
    padding: 0 1rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    outline: none;
    height: 100%;
}

.dropdown-wrapper {
    display: flex;
    align-items: center;
    border-right: 1px solid #E5E7EB;
}

#long-url {
    flex: 1;
    padding: 1.1rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
    font-family: inherit;
    color: var(--text-main);
}

/* API Toggles */
.api-toggle-pro {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.radio-label:hover { color: var(--primary); }
.radio-label input { display: none; }

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
}

.radio-label input:checked + .custom-radio {
    border-color: var(--primary);
    border-width: 6px;
}

/* Button Pro */
.pro-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(255, 149, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pro-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 149, 0, 0.4);
}

.pro-btn:active { transform: translateY(0); }

/* Result Box Pro */
.animate-slide {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-container { margin-top: 2rem; }
.result-label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.5rem; }

.result-box {
    background: var(--primary-soft);
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed var(--primary);
}

#shortened-url { 
    color: var(--primary-dark); 
    font-size: 1.1rem; 
}

.icon-btn-pro {
    background: white;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.icon-btn-pro:hover { transform: scale(1.1); background: var(--primary); color: white; }

/* History Section Pro */
.history-section { margin-top: 3rem; }
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.2rem;
}
.section-header h2 { font-size: 1.1rem; color: var(--text-main); margin: 0; font-weight: 800; }
.paw-badge { font-size: 1.2rem; }

.history-card {
    background: white;
    padding: 1.2rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.history-card:hover {
    transform: translateX(5px);
    border-color: var(--primary-soft);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.delete-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #FEE2E2;
    color: #EF4444;
    font-weight: 900;
}

.delete-btn:hover { background: #EF4444; color: white; }

.hidden { display: none; }

/* Loader Fix */
.loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s infinite linear;
}

button.loading .btn-text { display: none; }
button.loading .loader { display: block; margin: 0 auto; }

@keyframes spin { to { transform: rotate(360deg); } }