:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ghost {
    background: transparent;
    color: var(--text-color);
}

.btn-ghost:hover {
    background: var(--glass-bg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

/* Hero Section */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 3rem;
}

/* Shortener Box */
.shortener-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.input-group {
    display: flex;
    gap: 1rem;
}

input {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Result Box */
.result-box {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
}

.short-link {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

.warning-text {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.warning-text a {
    color: #fbbf24;
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1e293b;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--glass-border);
}

.modal-content.large {
    max-width: 700px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    z-index: 10;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form input {
    width: 100%;
    margin-bottom: 1rem;
}

.full-width {
    width: 100%;
}

.switch-auth {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.switch-auth a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.visit-list {
    list-style: none;
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.visit-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* URL Table */
.url-list-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.url-table {
    width: 100%;
    border-collapse: collapse;
    color: #cbd5e1;
}

.url-table th,
.url-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.url-table th {
    color: var(--primary-color);
    font-weight: 600;
}

.url-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.url-table a {
    color: var(--accent-color);
    text-decoration: none;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Danger Zone */
.danger-zone {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.danger-zone h3 {
    color: #ef4444;
    margin-top: 0;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #dc2626;
}

.delete-btn-small {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.delete-btn-small:hover {
    background: #ef4444;
    color: white;
}

/* Verification Input */
#verifyCode {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    letter-spacing: 10px;
    text-align: center;
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    margin-bottom: 15px;
}

#verifyCode:focus {
    border-color: var(--primary-color);
    outline: none;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideIn 0.3s ease-out forwards;
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}