/* URL Shortener - Main Styles */

body {
    background-color: #f8f9fa;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.table th {
    border-top: none;
    background-color: #f8f9fa;
    font-weight: 600;
}

.short-url {
    background-color: #e3f2fd;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    color: #1565c0;
}

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

.action-buttons .btn {
    margin-right: 5px;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8em;
}

.active>.page-link,
.page-link.active {
    background-color: #6c6bcf;
    border-color: #6c6bcf;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.input-group-text {
    background-color: #667eea;
    color: white;
    border: 2px solid #667eea;
    border-radius: 10px 0 0 10px;
}

.preview-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 10px;
    background: #fff;
    padding-bottom: 30px;
}

.login-header h2 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    margin: 0;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Button Styles */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Copy Button */
.copy-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: #6c757d;
}

body.drag-active .drag-handle {
    cursor: grabbing;
}

/* Data table */
table.dataTable td,
table.dataTable th {
    white-space: nowrap;
}

/* TB Page */
html,
body {
    min-height: 100%;
}

.tb-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 48px 0 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-container {
    max-width: 550px;
    background: #fff;
    padding: 50px 30px;
    border-radius: 30px;
    margin: 0 auto;
    color: #000;
}

.tb-hero .logo {
    max-width: 150px;
    margin: 0 auto;
}

.tb-hero .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tb-hero .handle {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 16px;
}

.tb-hero .tagline {
    opacity: .9;
    max-width: 680px;
    margin: 6px auto 0;
}

.tb-card {
    border-radius: 14px;
    border-bottom: 3px solid #7355b0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.tb-card:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color rgba(255, 255, 255, 1);
    border-color: transparent;

}

.tb-card:hover * {
    color: #fff;
}

.tb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.tb-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-title {
    font-weight: 600;
}

.tb-ellipsis {
    border: none;
    background: transparent;
    color: #6c757d;
}

.tb-ellipsis:hover {
    color: #343a40;
}

.tb-container {
    position: relative;
}

.tb-share-page {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #6c757d;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tb-share-page:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #343a40;
}

.share-header {
    border: 2px solid #7355b0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    padding: 20px;
    border-radius: 15px;
}

.share-logo img {
    width: 150px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 10px;
}

.share-header .handle {
    font-weight: 600;
    font-size: 17px;
}

.social-link {
    border-radius: 50%;
    padding: 0 !important;
    width: 40px;
    height: 40px;
    line-height: 38px;
    text-align: center;
}

.modal-content {
    border-radius: 20px;
    border: 0;
}

.form-switch .form-check-input{
width: 35px;
  height: 22px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .card {
        margin-bottom: 20px;
    }

    .action-buttons .btn {
        margin-bottom: 5px;
    }

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