:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --primary: #EB5757;
    --primary-hover: #d94a4a;
    --danger: #cf3030;
    --danger-hover: #b02424;
    --text-main: #f1f1f1;
    --text-muted: #a0a0a0;
    --border: #333;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    max-width: 550px;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

header { text-align: center; margin-bottom: 25px; }
header .logo img { height: 40px; margin-bottom: 15px; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text-main); }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; line-height: 1.5; }

.card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

input[type="text"], 
input[type="password"], 
select, 
.result-box {
    width: 100%;
    padding: 16px;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
    margin-bottom: 15px;
}

.result-box {
    text-align: center;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 54px;
}

#resultLink, #destUrl, .result-box a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
    transition: color 0.2s;
}

#resultLink:hover, .result-box a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

input:focus, select:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.2); 
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.1s, background 0.2s;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn:active { transform: scale(0.98); }

.primary { background: var(--primary); color: white; }
.primary:hover { background: var(--primary-hover); }

.danger { background: var(--danger); color: white; }
.danger:hover { background: var(--danger-hover); }

.secondary { background: var(--border); color: var(--text-main); }
.secondary:hover { background: #444; }

label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    background: #0a0a0a;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.checkbox-group input { width: auto; margin: 0; cursor: pointer; }
.checkbox-group label { margin: 0; cursor: pointer; }

.link-item {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.link-id {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    font-size: 1.1rem;
}

.link-url {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    text-decoration: none;
}

.link-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }