/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    color: #333;
    background-color: #f4f7fc;
}

/* Header */
header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-align: center;
    padding: 50px 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

header a {
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background: #28a745;
    border-radius: 5px;
    transition: background 0.3s ease;
}

header a:hover {
    background: #218838;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Buttons */
button, .add-button, .logout a {
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-button {
    background-color: #007bff;
    color: white;
    margin-bottom: 20px;
}

.add-button:hover {
    background-color: #0056b3;
}

.logout a {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
}

.logout a:hover {
    background-color: #c82333;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 15px;
}

th {
    background-color: #004aad;
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

tr:nth-child(even) {
    background-color: #f9fbfc;
}

tr:hover {
    background-color: #eef4fc;
}

td.long-url {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    position: relative;
}

td.long-url:hover {
    white-space: normal;
}

.icon-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.icon-btn:hover {
    color: #0056b3;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }

    .add-button, .logout a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    button, .add-button, .logout a {
        font-size: 14px;
    }
}
