:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --error: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-y: auto;
    padding: 2rem 0;
}

/* Background animated shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    border-radius: 50%;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    border-radius: 50%;
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: #ec4899;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

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

.container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

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

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.prefix {
    padding: 0.8rem 0.5rem 0.8rem 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    background: transparent;
    user-select: none;
}

input[type="text"],
input[type="url"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-wrapper input[type="text"] {
    border: none;
    background: transparent;
    padding-left: 0;
}

.input-wrapper input[type="text"]:focus {
    box-shadow: none;
    outline: none;
}

input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

button {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

button::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: left 0.5s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(1px);
}

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); }
}

.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.copy-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Table Styles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
    min-width: 600px;
}

.links-table th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.links-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    vertical-align: middle;
}

.links-table tr:last-child td {
    border-bottom: none;
}

.click-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    min-width: 45px;
    text-align: center;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.link-url {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link-url:hover {
    color: #a78bfa;
    text-decoration: underline;
}

.dest-url-wrapper {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-url {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.dest-url:hover {
    color: var(--text-primary);
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 0 !important;
    font-style: italic;
}

main.glass-panel {
    max-width: 600px;
    margin: 0 auto;
}
