/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fb;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 15px;
}

.nav a {
    text-decoration: none;
    color: #7f8c8d;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav a:hover {
    background: #ecf0f1;
}

.nav a.active {
    background: #3498db;
    color: white;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.stat-box h3 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-box p {
    color: #7f8c8d;
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

tr:hover {
    background: #f8f9fa;
}

.url-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

/* Form Styling */
.form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.form-container h2 {
    margin-bottom: 25px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.form-group input[type="url"],
.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.btn-submit {
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #2980b9;
}

.info-box {
    background: #eaf2fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.info-box ul {
    padding-left: 20px;
    color: #495057;
}

.info-box li {
    margin-bottom: 5px;
}

/* style.css - Tambahan untuk tombol copy */

.btn-copy {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    margin-left: 5px;
}

.btn-copy:hover {
    background: #218838;
}

.short-url-result {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
    padding: 8px 12px;
    background: #eaf2fa;
    border-radius: 6px;
    display: inline-block;
    margin: 5px 0;
}

.short-url-result:hover {
    background: #d4e4f7;
    text-decoration: underline;
}

/* Responsive untuk tombol copy */
@media (max-width: 768px) {
    .btn-copy {
        padding: 2px 8px;
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
    }
}