:root {
    --primary-color: #2c3e50;
    --secondary-color: #0d6efd;
    --accent-color: #e74c3c;
    --text-color: #333;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --footer-bg: #2c3e50;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    padding: 30px 20px 80px;
    flex: 1;
}

.card-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px 25px;
}

#codes {
    font-size: 16px;
    color: var(--text-color);
    background-color: #ffffff;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 150px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

#codes:focus {
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

textarea::placeholder {
    font-size: 14px;
    color: #95a5a6;
    font-style: italic;
}

.btn-primary {
    background-color: var(--secondary-color);
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.result-table {
    border: 1px solid #dee2e6;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
    background: white;
    animation: tableExpand 0.5s ease-out;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
}

.table {
    min-width: 600px;
    margin-bottom: 0;
}

.table thead {
    background-color: var(--secondary-color);
    color: white;
    position: sticky;
    top: 0;
}

.table td a {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.table td a:hover {
    color: #219a52;
    text-decoration: underline;
}

.status-badge {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    width: 100px;
    text-align: center;
}

.success-badge {
    background: #e8f6f3;
    color: #1d8348;
    border: 1px solid #52be80;
}

.success-badge:hover {
    background: #c8e6c9;
    border-color: #2ecc71;
}

.error-badge {
    background: #fdebd0;
    color: #b03a2e;
    border: 1px solid #e59866;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

.fa-spinner {
    animation: rotate 1.5s linear infinite;
}

.footer {
    padding: 10px 0; 
    background: var(--footer-bg);
    color: white;
    text-align: center;
    position: relative;
    width: 100%;
    min-height: 10px; 
}

.footer p {
    margin: 0;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer img {
    transition: transform 0.3s ease;
}

.footer a:hover img {
    transform: scale(1.1);
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 25px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    animation: slideIn 0.3s ease-out;
    z-index: 1050;
    font-size: 14px;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes tableExpand {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .table td, .table th {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .footer-logo {
        width: 40px;
    }
}