/* style.css - Custom styles for the link shortener */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px 16px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Header styles */
.display-4 {
    font-weight: 300;
    color: #333;
}

/* Shortened URL section */
.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Copy button animation */
#copyBtn {
    transition: all 0.3s ease;
}

#copyBtn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

#copyBtn.copied i:before {
    content: "\f00c"; /* check icon */
}

/* QR Code styles */
#qrModal .modal-dialog {
    max-width: 400px;
}

/* Admin panel styles */
.navbar-brand {
    font-weight: bold;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Statistics cards */
.card .card-body h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0;
}

.card .card-body small {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .form-control {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .input-group .btn {
        border-radius: 8px;
    }
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert animations */
.alert {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: #fff;
    }

    .card {
        background-color: #343a40;
        color: #fff;
    }

    .form-control {
        background-color: #495057;
        border-color: #6c757d;
        color: #fff;
    }

    .form-control:focus {
        background-color: #495057;
        color: #fff;
    }

    .table {
        color: #fff;
    }

    .table th {
        color: #fff;
    }
}