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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><path d="M10 10 L90 10 L90 90 L10 90 Z" fill="none" stroke="white" stroke-width="1"/><circle cx="50" cy="50" r="5" fill="white"/></svg>') repeat;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { transform: translate(-25%, -25%) scale(1); }
    50% { transform: translate(-25%, -25%) scale(1.1); }
}

.container {
    width: 90%;
    max-width: 650px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 48px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #0f172a;
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
}

input:hover {
    border-color: #94a3b8;
}

input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input::placeholder {
    color: #94a3b8;
}

button {
    width: 100%;
    padding: 18px 28px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.5);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

button:hover::before {
    width: 300px;
    height: 300px;
}

button:active {
    transform: translateY(0);
}

.result {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 24px;
    display: none;
    animation: fadeIn 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result.show {
    display: block;
}

.result h3 {
    color: #0f172a;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result h3::before {
    content: '🎉';
    font-size: 1.2em;
}

.short-url {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.short-url input {
    flex: 1;
    background: white;
    font-weight: 500;
    color: #0f172a;
    border: 2px solid #cbd5e1;
}

.copy-btn {
    width: auto;
    padding: 0 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
    font-size: 16px;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* 后台管理样式 */
.admin-container {
    max-width: 1200px;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.links-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 20px;
}

.links-table th {
    padding: 16px;
    text-align: left;
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.links-table td {
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.action-btn {
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.edit-btn {
    background: #3b82f6;
    color: white;
}

.edit-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

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

.delete-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* 加载动画 */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    animation: pulse 2s infinite;
}

.loader-text {
    font-size: 32px;
    color: white;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.loader-progress {
    width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    width: 0%;
    transition: width 0.1s;
    border-radius: 4px;
    box-shadow: 0 0 20px #3b82f6;
}

.loader-percent {
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 全屏框架 */
.fullscreen-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 1;
}

.frame-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 30px;
    font-size: 15px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.frame-header span:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.frame-header i {
    font-size: 20px;
    color: #3b82f6;
}

.domain-badge {
    background: rgba(59, 130, 246, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.info-text {
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-text::before {
    content: 'ℹ️';
    font-size: 14px;
}

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    display: none;
    border-left: 4px solid #ef4444;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    border-left: 4px solid #22c55e;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px black;
    animation: slideUp 0.3s;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.cancel-btn {
    background: #94a3b8;
}

.cancel-btn:hover {
    background: #64748b;
}

.logout-btn {
    background: #ef4444;
    width: auto;
    padding: 12px 30px;
    margin-top: 20px;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

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

.password-input {
    margin-bottom: 25px;
}

/* 加载容器 */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3b82f6;
    border-right: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 640px) {
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .short-url {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .frame-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .loader-progress {
        width: 280px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}