:root {
  --primary-color: #fc7700;
  --secondary-color: #888888;
  --background-color: #c7c7c7;
  --text-color: #333;
  --light-text: #fff;
  --shadow-color: rgba(0, 0, 0, 0.23);
  --brick-pattern: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox='0 0 42 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Page-1' fill='none' fill-rule='evenodd'%3E%3Cg id='brick-wall' fill='%23404040' fill-opacity='0.4'%3E%3Cpath d='M0 0h42v44H0V0zm1 1h40v20H1V1zM0 23h20v20H0V23zm22 0h20v20H22V23z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --card-shadow: 5px 10px var(--secondary-color);
  --transition-fast: all 0.2s ease;
}

/* Base Styles */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Raleway', sans-serif;
  background-color: var(--background-color);
  background-image: var(--brick-pattern);
  color: var(--text-color);
  overflow-x: hidden;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Header Styles */
.top_hed {
  margin-bottom: 30px;
}

.tit h3 {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 2rem;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.center_tit h3 {
  color: var(--light-text);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}

.st_btn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 0;
}

/* Button Styles */
.btn {
  border-radius: 5px;
  box-shadow: var(--card-shadow);
  padding: 10px 20px;
  font-weight: 600;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-success {
  background-color: var(--primary-color);
  border-color: darken(var(--primary-color), 10%);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 7px 12px var(--secondary-color);
}

/* Image Grid Styles */
.pre_img {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.pre_img li {
  background: white;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-fast);
  width: calc(16.666% - 20px);
  min-width: 100px;
  overflow: hidden;
}

.pre_img li:hover {
  transform: translateY(-5px);
  box-shadow: 7px 15px var(--secondary-color);
}

.pre_img li img {
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  display: block;
  padding: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox:target {
  display: flex;
}

/* Loading Animation */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(21, 21, 21, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#loading-image {
  width: 80px;
  height: 80px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .pre_img li {
    width: calc(20% - 15px);
  }
}

@media (max-width: 768px) {
  .top_hed {
    margin: 0 0 20px 0;
    text-align: center;
  }
  
  .tit h3 {
    font-size: 1.5rem;
  }
  
  .center_tit h3 {
    font-size: 1.1rem;
    margin: 10px 0;
  }
  
  .st_btn {
    justify-content: center;
    padding: 10px 0;
  }
  
  .pre_img li {
    width: calc(25% - 15px);
  }
}

@media (max-width: 576px) {
  .pre_img li {
    width: calc(33.333% - 15px);
  }
  
  .pre_img li img {
    max-height: 80px;
  }
  
  .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  .pre_img li {
    width: calc(50% - 15px);
  }
  
  .tit h3 {
    font-size: 1.3rem;
  }
  
  .center_tit h3 {
    font-size: 1rem;
  }
}

/* Animation Enhancements */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.container {
  animation: fadeIn 0.5s ease-out;
}

/* Accessibility Improvements */
a:focus, button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Print Styles */
@media print {
  .st_btn, #loading {
    display: none !important;
  }
  
  .pre_img li {
    page-break-inside: avoid;
  }
}