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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 25px 15px;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 700;
}

.tagline {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 300;
}

.main {
    padding: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

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

.url-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.alias-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    max-width: 100%;
}

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

.shorten-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.shorten-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.shorten-btn:active {
    transform: translateY(0);
}

.result-section {
    margin-bottom: 30px;
}

.result-section.hidden {
    display: none;
}

.result-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.result-item {
    margin-bottom: 20px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.original-url {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    word-break: break-all;
    color: #666;
    font-size: 14px;
    border: 1px solid #e0e0e0;
}

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

.short-url-display {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    background: white;
}

.copy-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    white-space: nowrap;
}

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

.copy-btn.copied {
    background: #4caf50;
}

.qr-code {
    max-width: 200px;
    height: auto;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.error-section {
    margin-bottom: 30px;
}

.error-section.hidden {
    display: none;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #fcc;
    font-weight: 500;
}

.info-section {
    background: #f0f4ff;
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.info-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.info-section ol {
    margin-left: 20px;
    color: #666;
    line-height: 1.8;
}

.info-section li {
    margin-bottom: 8px;
    font-size: 14px;
}

.stats-section {
    margin-top: 20px;
    margin-bottom: 0;
}

.stats-box {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
    color: white;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section:not(.hidden) {
    animation: slideIn 0.3s ease;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

    .header {
        padding: 30px 20px;
    }

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

    .main {
        padding: 20px;
    }

    .input-section {
        flex-direction: column;
    }

    .shorten-btn {
        width: 100%;
    }

    .short-url-container {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }
}
