/* Clean Pokémon-themed styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
    color: #334155;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

header {
    background: #fff;
    color: #1e293b;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e2e8f0;
}

header a {
    color: #475569;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
    font-weight: 700;
    font-size: 1.75rem;
    color: #3b82f6;
}

header nav {
    float: right;
    margin-top: 8px;
}

header .highlight, header .current a {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: #3b82f6;
}

header a:hover {
    color: #3b82f6;
}

nav ul li a.active {
    background: #3b82f6;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
}

/* Login Page */
.login-container {
    width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.75rem;
}

.login-container div {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.login-container button:hover {
    background: #2563eb;
}

.error-message {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.success-message {
    color: #059669;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

.card-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.card-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #cbd5e1;
}

.card-item img {
    max-width: 90%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.card-item h3, .card-item h4 {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.card-item p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 8px 0;
    font-weight: 400;
}

.card-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-view, .btn-add, .btn-admin-action {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.btn-view {
    background: #3b82f6;
    color: white;
}
.btn-view:hover {
    background: #2563eb;
}

.btn-delete {
    background: #dc2626;
    color: white;
    padding: 0;
    margin: 0;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: normal;
    text-decoration: none;
    display: inline;
}
.btn-delete:hover {
    background: #b91c1c;
}

.btn-add {
    background: #059669;
    color: white;
}
.btn-add:hover {
    background: #047857;
}

.btn-admin-action {
    background: #d97706;
    color: white;
}
.btn-admin-action:hover {
    background: #b45309;
}


/* Forms */
form {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

form h3 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

form div {
    margin-bottom: 16px;
}

form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
    width: calc(100% - 24px);
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="date"]:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

form input[type="search"] {
    width: calc(80% - 24px);
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form button[type="submit"], .btn {
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

form button[type="submit"]:hover, .btn:hover {
    background: #2563eb;
}

/* Tabs */
.tabs {
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.tabs button {
    background: transparent;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 12px 20px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    border-radius: 6px;
    margin: 0 2px;
}

.tabs button:hover {
    background: #f1f5f9;
    color: #475569;
}

.tabs button.active {
    background: #3b82f6;
    color: white;
}

.tabcontent {
    display: none;
    padding: 20px 0;
}

/* Main Content */
main.container {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin: 20px auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

main h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
}

/* View Card Page */
.card-detail-container {
    background: #fff;
    padding: 24px;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #e2e8f0;
}

.card-detail-image {
    flex: 1;
    padding-right: 24px;
    text-align: center;
}

.card-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-detail-info {
    flex: 2;
}

.card-detail-info h2 {
    margin-top: 0;
    color: #1e293b;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 12px;
    font-weight: 600;
}

.card-detail-info p {
    font-size: 1rem;
    margin: 12px 0;
    color: #475569;
    font-weight: 400;
}

.card-detail-info strong {
    color: #1e293b;
    font-weight: 600;
}

.card-detail-info ul {
    list-style: none;
    padding: 0;
}

.card-detail-info ul li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-weight: 400;
}

.attacks-section, .weaknesses-section, .resistances-section {
    margin-top: 20px;
}

.attacks-section h3, .weaknesses-section h3, .resistances-section h3 {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    margin-top: 40px;
    background: #1e293b;
    color: #94a3b8;
    font-weight: 400;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
}

/* Search Results */
#search-results {
    margin-top: 24px;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-result-item img {
    width: 150px;
    height: auto;
    margin-bottom: 12px;
    border-radius: 8px;
}

.search-result-info {
    text-align: center;
}

.search-result-info h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.125rem;
}

.search-result-info p {
    margin: 4px 0;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 400;
}

/* Duplicate items styling */
.duplicate-item {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.duplicate-owners {
    background: #fef2f2;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    list-style: none;
}

.duplicate-owners li {
    background: #fff;
    padding: 6px 12px;
    margin: 6px 0;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.admin-table th, .admin-table td {
    border: none;
    padding: 12px 16px;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table tr:nth-child(even) {
    background: #f8fafc;
}

.admin-table tr:hover {
    background: #f1f5f9;
}

.admin-table .action-links a {
    margin-right: 12px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.admin-table .action-links .delete-link {
    background: #fef2f2;
    color: #dc2626;
}

.admin-table .action-links .delete-link:hover {
    background: #dc2626;
    color: white;
}

.admin-table .action-links .edit-link {
    background: #eff6ff;
    color: #3b82f6;
}

.admin-table .action-links .edit-link:hover {
    background: #3b82f6;
    color: white;
}

/* Expenses Table */
.expenses-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.expenses-table th, .expenses-table td {
    border: none;
    padding: 12px 16px;
    text-align: left;
}

.expenses-table th {
    background: #f0fdf4;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid #bbf7d0;
}

.expenses-table tr:nth-child(even) {
    background: #f8fafc;
}

.expenses-table tr:hover {
    background: #f0fdf4;
}

.expenses-table td.amount {
    text-align: right;
    font-weight: 600;
    color: #059669;
}

.total-row td {
    font-weight: 600;
    background: #f0fdf4;
    color: #1e293b;
    font-size: 1rem;
    border-top: 2px solid #bbf7d0;
}

/* Responsive Design */
@media(max-width: 768px) {
    header #branding,
    header nav,
    header nav li {
        float: none;
        text-align: center;
        width: 100%;
    }

    header {
        padding-bottom: 16px;
    }

    header #branding h1 {
        font-size: 1.5rem;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    main.container {
        padding: 16px;
        margin: 10px auto;
    }

    main h2 {
        font-size: 1.75rem;
    }

    .login-container {
        width: 90%;
        margin: 50px auto;
        padding: 24px 16px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }

    .card-detail-container {
        flex-direction: column;
        padding: 16px;
    }
    
    .card-detail-image {
        padding-right: 0;
        margin-bottom: 16px;
    }

    .tabs button {
        padding: 10px 12px;
        font-size: 14px;
        margin: 0 1px;
    }    .btn-view, .btn-add, .btn-admin-action {
        padding: 6px 12px;
        font-size: 0.75rem;
        margin: 2px;
    }

    .admin-table, .expenses-table {
        font-size: 0.875rem;
    }

    .admin-table th, .admin-table td,
    .expenses-table th, .expenses-table td {
        padding: 8px 6px;
    }
}

@media(max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-item {
        padding: 12px;
    }
    
    .search-result-item img {
        width: 120px;
    }

    form {
        padding: 16px;
    }

    form input[type="search"] {
        width: calc(100% - 24px);
        margin-bottom: 8px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

