body {
    font-family: "Times New Roman", Times, serif;
    background-color: #ffffff;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAYAAAASC7TOAAAAGklEQVQIHWPY9+8fAzYwirIKjBAqMoq8AoACn7A/1jkG2rAAAAAElFTkSuQmCC');
    color: #000000;
    margin: 10px;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 15px;
}

h1 {
    color: #0000ff;
    text-decoration: underline;
    font-size: 28px;
    margin: 10px 0;
    text-shadow: 2px 2px #cccccc;
}

h3 {
    color: #800080;
    font-size: 18px;
    margin: 5px 0;
}

p {
    font-size: 14px;
    margin: 10px 0;
}

/* Scrollable container - transform-based scrolling */
#scrollContainer {
    height: 400px;
    overflow: hidden; /* Hide overflow for transform animation */
    border: 2px inset #cccccc;
    background-color: #ffffff;
    margin: 20px 0;
    position: relative;
}

/* Wrapper for transform-based scrolling */
#tableWrapper {
    width: 100%;
    position: relative;
    will-change: transform;
    transition: transform 2.5s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Custom scrollbar styling */
.scroll-container::-webkit-scrollbar {
    width: 16px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border: 1px inset #cccccc;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

table {
    width: 100%;
    background-color: #ffffff;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 12px;
    margin: 0;
}

th {
    background-color: #cccccc;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #666666;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 8px;
    border: 1px solid #999999;
    background-color: #ffffff;
    vertical-align: top;
}

/* Each animal row has consistent height for reliable positioning */
.animal-row {
    height: 60px;
    cursor: default;
    transition: all 0.3s ease; /* Smooth transitions for all properties */
    transform: translateZ(0); /* Hardware acceleration for smoother scrolling */
}

.animal-row td {
    height: 60px;
    vertical-align: middle;
}

.animal-row:hover {
    background-color: #ffffcc !important;
}

.animal-row:hover td {
    background-color: #ffffcc !important;
}

/* Top-most visible row highlighting */
.animal-row.at-top {
    background-color: #ffcccc !important;
    border-left: 4px solid #ff0000;
}

.animal-row.at-top td {
    background-color: #ffcccc !important;
    font-weight: bold;
}

/* Selection highlighting */
.animal-row.selected {
    background-color: #ccffcc !important;
    animation: blink 2s ease-in-out infinite;
}

.animal-row.selected td {
    background-color: #ccffcc !important;
    font-weight: bold;
}

button {
    background-color: #cccccc;
    border: 2px outset #cccccc;
    padding: 8px 20px;
    font-family: "Times New Roman", Times, serif;
    font-size: 12px;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #dddddd;
}

button:active {
    border: 2px inset #cccccc;
}

a {
    color: #0000ff;
    text-decoration: underline;
}

a:visited {
    color: #800080;
}

a:hover {
    color: #ff0000;
    text-decoration: none;
}

hr {
    border: 1px solid #cccccc;
    margin: 20px 0;
}

small {
    font-size: 11px;
    color: #666666;
}

i {
    font-style: italic;
}

b {
    font-weight: bold;
}

center {
    text-align: center;
}

/* Selection display */
#selectedObject {
    color: #800000;
    font-weight: bold;
    font-size: 14px;
}

/* Blink animation for selection */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.8; }
}

/* Scroll position indicator (subtle) */
.scroll-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 2px 5px;
    font-size: 10px;
    border-radius: 3px;
    pointer-events: none;
}

/* Smooth scroll behavior */
.scroll-container {
    scroll-behavior: smooth;
}

/* Table border styling */
table[border="1"] {
    border: 2px inset #cccccc;
}

/* Header row stays fixed */
.scroll-container table tr:first-child th {
    position: sticky;
    top: 0;
    background-color: #cccccc;
    z-index: 20;
}

/* Email/guestbook links styling */
a[href^="mailto:"] {
    font-weight: bold;
}

/* Copyright section */
.container center:last-child {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
}

/* Retro processing animation */
.processing {
    background-color: #ffffaa !important;
    animation: processing 0.5s ease-in-out;
}

.processing td {
    background-color: #ffffaa !important;
}

@keyframes processing {
    0%, 100% { background-color: #ffffaa; }
    50% { background-color: #ffff88; }
}

/* Responsive adjustments */
@media screen and (max-width: 640px) {
    .container {
        margin: 5px;
        padding: 10px;
    }
    
    .scroll-container {
        height: 300px;
    }
    
    table {
        font-size: 11px;
    }
    
    .animal-row {
        height: 50px;
    }
    
    .animal-row td {
        height: 50px;
        padding: 5px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    th, td {
        padding: 5px;
    }
}

/* IE6 compatibility */
* html .animal-row {
    zoom: 1;
}


/* Visitor counter effect */
.counter {
    background-color: #000000;
    color: #00ff00;
    font-family: "Courier New", monospace;
    font-size: 11px;
    padding: 2px 5px;
    border: 1px solid #333333;
}

/* Classic web behaviors */
table {
    font-family: "Times New Roman", Times, serif;
}

/* Selection animation */
.selecting {
    background-color: #ffff99 !important;
}

.selecting td {
    background-color: #ffff99 !important;
}

/* Top row indicator */
.top-row-indicator {
    position: absolute;
    left: 0;
    right: 0;
    top: 80px; /* Adjust based on header height */
    height: 2px;
    background: rgba(255, 0, 0, 0.3);
    pointer-events: none;
    z-index: 15;
}