/* --- URL Shortener Page --- */

/* Hero */
.shorten-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 24px 32px;
    max-width: 700px;
    margin: 0 auto;
}
.shorten-hero h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.shorten-hero h1 .gradient {
    background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.shorten-hero p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Section */
.shorten-section {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* Card */
.shorten-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    overflow: hidden;
}
.shorten-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-500), transparent);
}

/* URL Input */
.url-input-group {
    margin-bottom: 24px;
}
.url-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.url-input-group input[type="url"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s;
}
.url-input-group input[type="url"]:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.url-input-group input[type="url"]::placeholder {
    color: var(--text-muted);
}

/* Expiration Options */
.expiration-options {
    margin-bottom: 24px;
}
.expiration-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.expiration-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-500);
    cursor: pointer;
}
.expiration-toggle label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}
.expiration-duration-row {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.expiration-duration-row.active {
    display: flex;
}
.expiration-duration-row label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}
.expiration-duration-row select {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    outline: none;
    font-family: var(--font-family);
}
.expiration-duration-row select:focus {
    border-color: var(--blue-500);
}

/* reCAPTCHA */
.shorten-recaptcha {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Submit Button */
.btn-shorten {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-family);
}
.btn-shorten:hover {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    box-shadow: 0 4px 24px var(--blue-glow);
    transform: translateY(-1px);
}
.btn-shorten:active {
    transform: translateY(0);
}
.btn-shorten:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Card */
.result-card {
    display: none;
    margin-top: 24px;
    padding: 20px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
}
.result-card.active {
    display: block;
}
.result-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.result-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.result-url-row input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--blue-400);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    outline: none;
}
.btn-copy {
    padding: 10px 18px;
    background: var(--blue-600);
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    white-space: nowrap;
}
.btn-copy:hover {
    background: var(--blue-500);
}

/* Error Card */
.error-card {
    display: none;
    margin-top: 16px;
    padding: 14px 20px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 14px;
}
.error-card.active {
    display: block;
}

/* Recent Links Section */
.recent-links-section {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 60px;
}
.section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.recent-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Link Item */
.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.link-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: var(--bg-card-hover);
}
.link-item-left {
    flex: 1;
    min-width: 0;
}
.link-item-short a {
    font-size: 14px;
    font-weight: 500;
    color: var(--blue-400);
    text-decoration: none;
}
.link-item-short a:hover {
    text-decoration: underline;
}
.link-item-dest {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-item-right {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    flex-shrink: 0;
}
.link-item-status {
    color: #f87171;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .shorten-hero { padding: 40px 16px 24px; }
    .shorten-hero h1 { font-size: 28px; }
    .shorten-card { padding: 24px; }
}
@media (max-width: 480px) {
    .shorten-hero h1 { font-size: 24px; }
    .link-item { flex-direction: column; align-items: flex-start; }
    .link-item-right { text-align: left; }
    .result-url-row { flex-direction: column; }
    .btn-copy { width: 100%; text-align: center; }
}
