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

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

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

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

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

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

label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

small {
    color: #999;
    font-size: 0.85em;
    display: block;
    margin-top: 5px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

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

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

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

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

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

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

.result label {
    margin-bottom: 10px;
    color: #555;
}

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

.short-url-container input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
}

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

.btn-copy:hover {
    background-color: #5568d3;
}

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

.stats {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.stats p {
    color: #666;
    margin: 8px 0;
    font-size: 0.95em;
}

.stats strong {
    color: #667eea;
    font-size: 1.2em;
}

/* Estilos para formulário de edição */
.edit-form {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #667eea;
}

.edit-form h2 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-cancel {
    flex: 1;
    padding: 14px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* Estilos para lista de URLs */
.url-list {
    margin-top: 40px;
}

.url-list h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.no-urls {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.urls-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.urls-table thead {
    background-color: #667eea;
    color: white;
}

.urls-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}

.urls-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.urls-table tbody tr:hover {
    background-color: #f8f9fa;
}

.urls-table td {
    padding: 12px;
    font-size: 0.9em;
    color: #333;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.urls-table a:hover {
    text-decoration: underline;
}

.actions {
    white-space: nowrap;
}

.short-link-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-small {
    padding: 4px 8px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-copy-small:hover {
    background-color: #5568d3;
    transform: scale(1.1);
}

.btn-copy-small:active {
    transform: scale(0.95);
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    margin-right: 5px;
}

.btn-edit {
    background-color: #ffc107;
    color: #000;
}

.btn-edit:hover {
    background-color: #e0a800;
}

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

.btn-delete:hover {
    background-color: #c82333;
}

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

    h1 {
        font-size: 2em;
    }

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

    .btn-copy {
        width: 100%;
    }

    .urls-table {
        font-size: 0.8em;
    }

    .urls-table th,
    .urls-table td {
        padding: 8px 5px;
    }

    .url-cell {
        max-width: 150px;
    }

    .form-actions {
        flex-direction: column;
    }
}
