* {
    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;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    font-size: 42px;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

.form-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

input[type="url"], input[type="text"] {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.result {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

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

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

.hidden {
    display: none;
}

.links {
    text-align: center;
    margin-top: 30px;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s;
}

.links a:hover {
    background: #f0f0f0;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert.error {
    background: #fee;
    color: #c33;
    border: 2px solid #fcc;
}

/* Dashboard styles */

.links-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.link-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.link-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.link-card.expired {
    opacity: 0.6;
    border-color: #ff6b6b;
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.short-id {
    font-weight: 700;
    color: #667eea;
    font-size: 18px;
    word-break: break-all;
}

.clicks {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.link-url {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.link-url input {
    font-size: 14px;
    padding: 10px 15px;
}

.edit-btn {
    padding: 10px 20px;
    background: #4CAF50;
}

.link-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.link-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.warning {
    color: #ff9800;
    font-weight: 600;
}

.expired-label {
    color: #ff6b6b;
    font-weight: 600;
}

.link-actions {
    display: flex;
    gap: 10px;
}

.link-actions button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.delete-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.empty-state {
    text-align: center;
    color: #999;
    font-size: 18px;
    padding: 60px 20px;
}

.empty-state a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .form-box, .short-url-box, .link-url {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .link-info {
        flex-direction: column;
        gap: 8px;
    }
}
