* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00f5ff;
    --secondary: #7c3aed;
    --accent: #f72585;
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --border: #2a2a3e;
    --success: #00ff88;
    --error: #ff3366;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.app {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    top: 50%;
    right: -175px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.title-icon {
    display: inline-block;
    margin-right: 0.4rem;
    animation: pulse 2s infinite;
    font-size: 1.8rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.4rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

.tab.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.main-content {
    flex: 1;
    animation: fadeInUp 0.6s ease-out;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Shortener Styles */
.shortener-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.shortener-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.preview-section {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.preview-header {
    background: rgba(0, 245, 255, 0.05);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.preview-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-content {
    padding: 1.5rem;
    min-height: 200px;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 2rem 1rem;
}

/* Shareable Preview Styles */
.shareable-preview-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-dark);
}

.shareable-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(0, 245, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.shareable-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shareable-preview-body {
    padding: 1rem;
}

.shareable-preview-url {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.shareable-preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.shareable-preview-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Target Link Preview Styles */
.target-info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.target-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.target-info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.target-info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.5;
}

.target-info-value.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.target-info-favicon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    vertical-align: middle;
    border-radius: 2px;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.4rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.url-input,
.stats-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.url-input:focus,
.stats-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(26, 26, 46, 0.8);
}

.url-input::placeholder,
.stats-input::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.25);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn.loading {
    position: relative;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    padding: 0.75rem 1rem;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.5s ease;
    font-size: 0.875rem;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.success-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--success), #00cc6a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-dark);
    font-weight: bold;
}

.result-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-value {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-value code {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    min-width: 200px;
}

.copy-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.original-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    word-break: break-all;
    transition: all 0.3s ease;
}

.original-link:hover {
    color: var(--primary);
    background: rgba(0, 245, 255, 0.1);
}

.result-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Stats Styles */
.stats-form {
    margin-bottom: 1.5rem;
}

.view-all-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.view-all-btn:hover {
    background: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.stats-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stats-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.stats-card,
.all-stats {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.short-id-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value.small {
    font-size: 0.9rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-primary);
    word-break: break-all;
}

.visits-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.visits-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.visits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.visit-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.visit-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.visit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.visit-device {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.visit-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.visit-detail {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 60px;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-all;
}

.no-visits,
.no-links {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-item {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(0, 245, 255, 0.2));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.overview-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.overview-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.links-list {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.links-list h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.link-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-short-id {
    padding: 0.5rem 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
}

.link-visits {
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.link-url {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.link-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.view-details-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.view-details-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab {
        width: 100%;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }

    .result-card,
    .stats-card,
    .all-stats {
        padding: 1.5rem;
    }

    .result-value {
        flex-direction: column;
        align-items: stretch;
    }

    .result-value code {
        min-width: auto;
    }

    .copy-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

    .visit-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-details-btn {
        width: 100%;
    }
}

/* Form Enhancements */
.form-section {
    margin-bottom: 1rem;
}

.form-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.form-section small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-section {
    width: 100%;
}

.form-submit-section {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.shortener-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section textarea {
    resize: vertical;
    min-height: 60px;
    font-size: 0.875rem;
}

.form-section input[type="datetime-local"] {
    font-size: 0.875rem;
}

.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--secondary);
    margin: 0.2rem 0.2rem 0.2rem 0;
}

/* Dashboard Styles */
.dashboard-overview {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 245, 255, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(0, 245, 255, 0.2));
    border-radius: 12px;
}

.stat-info {
    flex: 1;
}

.stat-info .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-toggle-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-toggle-btn:hover {
    border-color: var(--secondary);
    background: rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.filter-toggle-btn.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(0, 245, 255, 0.3));
    border-color: var(--secondary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-toggle-btn span {
    font-size: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(26, 26, 46, 0.9);
}

.search-input:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.sort-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.sort-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: rgba(26, 26, 46, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c3aed' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.sort-select:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.links-table-container {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    min-height: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.links-table-container:empty::before {
    content: 'Loading links...';
    display: block;
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 2rem;
    font-size: 0.875rem;
}

.links-table-container .no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 2rem;
    font-size: 0.875rem;
    background: transparent;
    display: block;
}

.links-table-container .error-message {
    text-align: center;
    color: var(--error);
    padding: 2rem;
    font-size: 0.875rem;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    margin: 1rem;
    display: block;
}

.table-wrapper {
    overflow-x: auto;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
}

.links-table thead {
    background: rgba(0, 245, 255, 0.05);
}

.links-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.links-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    background: transparent !important;
    vertical-align: middle;
}

.links-table tbody tr {
    background: transparent !important;
}

.links-table tbody tr:last-child td {
    border-bottom: none;
}

.links-table tbody tr:hover {
    background: rgba(0, 245, 255, 0.08) !important;
}

.links-table tbody tr:hover {
    background: rgba(0, 245, 255, 0.05);
}

.links-table tbody tr.expired {
    opacity: 0.5;
}

.short-id {
    background: rgba(0, 245, 255, 0.15);
    border: 1px solid rgba(0, 245, 255, 0.4);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 245, 255, 0.1);
}

.expired-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--error);
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
}

.url-cell {
    max-width: 400px;
    min-width: 200px;
}

.url-cell strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.url-cell small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.original-url {
    color: var(--text-secondary);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.875rem;
    display: inline-block;
    margin-top: 0.25rem;
}

.original-url:hover {
    color: var(--primary);
    text-decoration: underline;
}

.click-count {
    font-weight: 600;
    color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(124, 58, 237, 0.4);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.icon-btn.delete-btn:hover {
    background: rgba(255, 51, 102, 0.3);
    border-color: var(--error);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

#user-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem 0;
    min-height: 50px;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.875rem;
}

.page-btn:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--secondary);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.modal-close:hover {
    background: rgba(255, 51, 102, 0.2);
    color: var(--error);
}

.modal-body {
    padding: 1.5rem;
}

/* Result Modal Specific Styles */
.modal-result {
    max-width: 600px;
}

.modal-result .result-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.modal-result .result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-result .result-item label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-result .result-value {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-result .result-value code {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    min-width: 200px;
}

.modal-result .result-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.modal-result .result-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-result .original-link {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.3s ease;
}

.modal-result .original-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(26, 26, 46, 0.9);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

#qrcode {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.bulk-results {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: var(--success);
    background: rgba(0, 255, 136, 0.1);
}

.notification.error {
    border-color: var(--error);
    background: rgba(255, 51, 102, 0.1);
}

/* Analytics Styles */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.analytics-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.analytics-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.analytics-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.analytics-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analytics-search-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(26, 26, 46, 0.9);
}

.analytics-search-input:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.analytics-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    padding-left: 1.25rem;
}

.dropdown-item strong {
    color: var(--primary);
    font-weight: 600;
}

.analytics-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    white-space: nowrap;
}

.analytics-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: rgba(26, 26, 46, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c3aed' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.analytics-select:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.chart-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(0, 245, 255, 0.15);
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card canvas {
    max-height: 300px;
}

/* Peak Hours Section */
.peak-hours-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(0, 245, 255, 0.1));
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.peak-hours-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.peak-hours-content {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.peak-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.peak-hour-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.peak-hour-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 245, 255, 0.15);
    background: rgba(26, 26, 46, 0.95);
}

.peak-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.rank-medal {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.peak-info {
    flex: 1;
}

.peak-time {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.peak-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.peak-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 3px;
    animation: fillBar 0.6s ease-out;
}

@keyframes fillBar {
    from {
        width: 0 !important;
    }
}

.peak-clicks {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detailed-stats {
    margin-top: 2rem;
}

.detailed-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.stat-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.stat-item-row:hover {
    background: rgba(0, 245, 255, 0.05);
    padding-left: 1rem;
}

.stat-item-row .stat-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.no-data {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: transparent;
    display: block;
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-header h2 {
        width: 100%;
    }

    .analytics-controls {
        width: 100%;
        flex-direction: column;
    }

    .analytics-search-wrapper {
        min-width: auto;
        width: 100%;
    }

    .analytics-select {
        width: 100%;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .chart-card {
        padding: 1rem;
    }

    .peak-hours-card {
        padding: 1.5rem;
    }

    .peak-hours-grid {
        grid-template-columns: 1fr;
    }

    .peak-hour-item {
        flex-direction: column;
        text-align: center;
    }

    .peak-rank {
        width: 100%;
    }

    .detailed-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Responsive - Dashboard */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-submit-section {
        margin-top: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-filter-bar {
        flex-direction: column;
    }
    
    .links-table {
        font-size: 0.875rem;
    }
    
    .links-table th,
    .links-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Auth Styles */
.user-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.user-info-bar span {
    color: var(--text-primary);
    font-weight: 600;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 51, 102, 0.2);
    border: 1px solid var(--error);
    border-radius: 8px;
    color: var(--error);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(255, 51, 102, 0.3);
    transform: translateY(-2px);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: flex-end;
}

.auth-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.auth-btn.register-btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border: none;
    color: var(--text-primary);
}

.auth-btn.register-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.user-dashboard {
    padding: 1.5rem;
    background: transparent;
}

.user-dashboard h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.user-stats {
    margin-bottom: 2rem;
    min-height: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.user-stats:empty::before {
    content: 'Loading stats...';
    display: block;
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.user-stats .no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.875rem;
}

.visibility-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.visibility-badge.public {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.visibility-badge.private {
    background: rgba(247, 37, 133, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}

/* Enhanced Input Styles for Better Visibility */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
    background: var(--bg-dark) !important;
    border: 2px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    background: rgba(26, 26, 46, 0.9) !important;
}

input[type="text"]:hover,
input[type="url"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="datetime-local"]:hover,
textarea:hover,
select:hover {
    border-color: rgba(124, 58, 237, 0.5) !important;
}

input[type="text"]::placeholder,
input[type="url"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7;
}

/* Select dropdown styling */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem !important;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237c3aed' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-close:hover {
    background: rgba(255, 51, 102, 0.2);
    color: var(--error);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(26, 26, 46, 0.9);
}

.form-group input:hover {
    border-color: rgba(124, 58, 237, 0.5);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .submit-btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cancel-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--secondary);
    color: var(--text-primary);
}

