/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}
section {
    padding: 40px;
    border-bottom: 1px solid #e0e0e0;
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}
form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="url"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="url"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}
.result {
    background: #f0f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.result.hidden {
    display: none;
}

.result p {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.short-url-display {
    display: flex;
    gap: 10px;
}

.short-url-display input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

#copyBtn {
    background: #48bb78;
}

#copyBtn:hover {
    background: #38a169;
}
#refreshBtn {
    background: #48bb78;
    margin-bottom: 20px;
}

#refreshBtn:hover {
    background: #38a169;
}

.url-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.url-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.url-info {
    flex: 1;
}

.url-info .short-code {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.url-info .original-url {
    color: #666;
    font-size: 0.9rem;
    word-break: break-all;
}

.url-info .meta {
    color: #999;
    font-size: 0.85rem;
    margin-top: 4px;
}

.url-actions {
    display: flex;
    gap: 8px;
}

.url-actions button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.stats-btn {
    background: #667eea;
}

.delete-btn {
    background: #f56565;
}

.delete-btn:hover {
    background: #e53e3e;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.stat-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.stat-item h3 {
    color: #667eea;
    margin-bottom: 8px;
}

.stat-item p {
    color: #666;
    line-height: 1.6;
}
.loading {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

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

.empty p {
    font-size: 1.1rem;
}