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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.container {
    width: 100%;
    /* max-width: 500px; */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.header.scrolled {
    transform: translateY(-100%);
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    padding: 40px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    width: auto;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #ff5252;
}

.btn-logout {
    background: #ff6b6b;
    color: white;
    width: auto;
    padding: 10px 20px;
}

.toggle-link {
    text-align: center;
    margin-top: 15px;
}

.toggle-link a {
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.toggle-link a:hover {
    text-decoration: underline;
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.show {
    display: block;
}

.hidden {
    display: none;
}

.url-list {
    margin-top: 30px;
}

.url-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.url-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.url-item-title {
    font-weight: 600;
    color: #333;
    word-break: break-all;
    flex: 1;
    margin-right: 10px;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #764ba2;
}

.copy-btn.copied {
    background: #28a745;
}

.url-item-details {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.url-item-details span {
    margin-right: 20px;
}

.url-item-original {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    margin-bottom: 10px;
}

.url-item-original strong {
    display: block;
    color: #999;
    font-size: 11px;
    margin-bottom: 3px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 10px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-header h2 {
    font-size: 24px;
    color: #333;
}

.user-info {
    text-align: right;
}

.user-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.user-email {
    font-weight: 600;
    color: #333;
}

@media (max-width: 600px) {
    .content {
        padding: 25px;
    }

    .header h1 {
        font-size: 22px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        text-align: left;
        margin-top: 15px;
    }
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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