/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #1EAEDB;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0FA0CE;
    text-decoration: underline;
}

/* Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Form container */
.form-container {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Logo styling */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

/* Form styling */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.form-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: #33C3F0;
    box-shadow: 0 0 0 2px rgba(51, 195, 240, 0.2);
    outline: none;
}

.slug-group {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.domain-prefix {
    background-color: #f1f1f1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #555;
    min-width: max-content;
}

.slug-group input {
    border-radius: 0 4px 4px 0;
    flex-grow: 1;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
}

.btn:active {
    transform: translateY(1px);
}

.primary-btn {
    background-color: #1EAEDB;
    color: white;
}

.primary-btn:hover {
    background-color: #0FA0CE;
}

.secondary-btn {
    background-color: #eee;
    color: #333;
}

.secondary-btn:hover {
    background-color: #ddd;
}

.danger-btn {
    background-color: #e74c3c;
    color: white;
}

.danger-btn:hover {
    background-color: #c0392b;
}

.logout-btn {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
    font-size: 14px;
    padding: 6px 12px;
}

.logout-btn:hover {
    background-color: #f1f1f1;
}

.small {
    font-size: 12px;
    padding: 5px 10px;
}

/* Form footer */
.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Alert messages */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    transition: opacity 0.5s ease;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard specific styles */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #555;
}

.dashboard-content {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.card h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.link-group-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.group-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.base-url-info {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 20px;
    word-break: break-all;
}

.create-link-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.create-link-form h4 {
    margin-bottom: 15px;
}

.update-base-form {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Tables */
.links-table-container {
    margin-top: 25px;
}

.links-table-container h4 {
    margin-bottom: 15px;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.links-table th,
.links-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.links-table th {
    font-weight: 600;
    color: #555;
    background-color: #f9f9f9;
}

.links-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Inline form */
.inline-form {
    display: inline;
}

/* Message styles */
.no-links-message,
.no-groups-message {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .group-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .links-table {
        display: block;
        overflow-x: auto;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .dashboard-content {
        padding: 20px 10px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .dashboard-nav {
        padding: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-container,
.card,
.link-group-card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Focus visible styles for accessibility */
:focus-visible {
    outline: 2px solid #33C3F0;
    outline-offset: 2px;
}