/* shared_css: This file contains global styles applicable across the entire application. */

/* Reset and Base Styles */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f4f7f6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: #2c3e50;
}

p {
    margin-top: 0;
    margin-bottom: 15px;
}

ul, ol {
    margin-top: 0;
    margin-bottom: 15px;
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}

/* Layout and Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    color: #fff;
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-danger {
    color: #fff;
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #b02c20;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Cards and Panels */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #e9ecef;
    font-weight: bold;
    text-align: left;
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.05);
}

.table-hover tbody tr:hover {
    color: #212529;
    background-color: rgba(0,0,0,.075);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 24px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    .form-control {
        font-size: 14px;
        padding: 8px 10px;
    }
}

/* Specific styles for main content area */
#app-main-content {
    min-height: calc(100vh - 120px - 80px); /* Adjust based on actual header/footer heights */
    padding: 20px;
    background-color: #fdfdfd;
}

/* Footer specific styles to ensure it's distinct */
.main-footer {
    background-color: #34495e;
    color: #ecf0f1;
    padding: 40px 30px;
    font-size: 14px;
    border-top: 1px solid #2c3e50;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #ecf0f1;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.footer-section p,
.footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ecf0f1;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons .icon-link {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #556a7f;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.social-icons .icon-link:hover {
    background-color: #3498db;
}

.social-icons .icon-link img {
    width: 18px;
    height: 18px;
    filter: invert(100%); /* Make social icons white */
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-section {
        width: 100%;
        text-align: center;
    }
    .social-icons {
        justify-content: center;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
