/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #be0000 0%, #710000 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
    color: #be0000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge {
    background: #be0000;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Auth Box */
.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 450px;
    margin: 50px auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.auth-box h1 {
    text-align: center;
    color: #be0000;
    margin-bottom: 10px;
}

.auth-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #be0000;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background: #be0000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn:hover {
    background: #710000;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Create URL Box */
.create-url-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.create-url-box h2 {
    margin-bottom: 20px;
    color: #333;
}

/* URLs List */
.urls-list {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.urls-list h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table thead {
    background: #f8f9fa;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

table tbody tr:hover {
    background: #f8f9fa;
}

table tbody tr.inactive {
    opacity: 0.6;
}

.short-link {
    color: #be0000;
    text-decoration: none;
    font-weight: 600;
}

.short-link:hover {
    text-decoration: underline;
}

.original-url a {
    color: #555;
    text-decoration: none;
}

.original-url a:hover {
    color: #be0000;
}

.copy-btn {
    background: #f0f0f0;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #e0e0e0;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.actions {
    white-space: nowrap;
}

.actions .btn {
    margin-right: 5px;
}

/* Stats */
.stats-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.url-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.url-info h2 {
    margin-bottom: 15px;
    color: #333;
}

.info-row {
    margin-bottom: 10px;
}

.info-row strong {
    display: inline-block;
    width: 140px;
    color: #555;
}

.stats-summary {
    margin-bottom: 30px;
}

.stats-summary h3 {
    margin-bottom: 15px;
    color: #333;
}

.stat-card {
    background: linear-gradient(135deg, #be0000 0%, #710000 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    display: inline-block;
    min-width: 200px;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Error Page */
.error-box {
    background: white;
    padding: 60px 40px;
    border-radius: 10px;
    max-width: 600px;
    margin: 100px auto;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.error-box h1 {
    font-size: 72px;
    color: #be0000;
    margin-bottom: 10px;
}

.error-box h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.error-box p {
    color: #666;
    margin-bottom: 30px;
}

/* Utility Classes */
.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: #be0000;
    text-decoration: none;
}

.text-center a:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.default-credentials {
    margin-top: 30px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .auth-box {
        padding: 30px 20px;
        margin: 20px auto;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 4px;
    }

    .actions .btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .stat-card {
        min-width: 150px;
    }

    .stat-value {
        font-size: 36px;
    }
}
