/* URL Shortener Styles */
* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

h1, h2 {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="url"] {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-group a, .btn-group button {
    flex: 1;
}

/* Responsive Dashboard Table */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    position: sticky;
    top: 0;
}

td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.original-col {
    max-width: 250px;
}

/* Mobile: Cards instead of table */
@media (max-width: 768px) {
    .table-container table,
    .table-container thead,
    .table-container tbody,
    .table-container th,
    .table-container td,
    .table-container tr {
        display: block;
    }
    
    .table-container thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-container tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 12px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        display: block;
    }
    
    .table-container td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: 8px;
        padding-bottom: 8px;
        text-align: right;
        max-width: none;
        white-space: normal;
        display: block;
    }
    
    .table-container td:before {
        content: attr(data-label);
        position: absolute;
        left: 8px;
        width: 45%;
        font-weight: 600;
        color: #64748b;
        text-align: left;
    }
    
    .delete-col td {
        padding-left: 0;
    }
    
    .delete-col td:before {
        content: '';
    }
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 32px;
}

.delete-btn:hover {
    background: #dc2626;
}

@media (max-width: 768px) {
    table {
        font-size: 14px;
    }
    th, td {
        padding: 8px 4px;
    }
}

th {
    background: #f7fafc;
}

.shortlink-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.short-link {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    flex: 1;
}

.short-link:hover {
    text-decoration: underline;
}

.copy-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .shortlink-cell {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .copy-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-weight: 500;
    max-width: 300px;
    word-break: break-word;
}


.message {
    padding: 10px;
    margin: 1rem 0;
    border-radius: 5px;
}

.success { background: #c6f6d5; color: #22543d; }
.error { background: #fed7d7; color: #742a2a; }

.honeypot {
    display: none;
}

@media (max-width: 480px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

