/* app/static/css/base_style.css */

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    box-sizing: border-box;
    height: 100%;
    overflow: auto; /* Changed from hidden to auto to allow scrolling */
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.navbar {
    width: 100vw;
    min-width: 100vw;
    margin: 0;
    left: 0;
    top: 0;
    position: relative;
    background: #23272b;
    box-sizing: border-box;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
}

@media (max-width: 1300px) {
    .navbar > .navbar-left, .navbar > .navbar-right {
        max-width: 98vw;
    }
}

.navbar-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    margin-right: 30px;
    text-decoration: none;
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-item {
    margin-right: 20px;
}

.vip-tag {
    background: linear-gradient(45deg, #ffc66d, #ffa500);
    color: #4a2a00;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 5px;
    font-size: 0.85rem;
}

.navbar-nav .nav-item a svg,
.navbar-nav .nav-item a img,
.navbar-nav .nav-item .dropbtn svg,
.navbar-nav .nav-item .dropbtn img {
    margin-right: 5px; /* Add some space between icon and text */
    position: relative;
    top: 2px; /* Fine-tune vertical alignment of SVG icon with text: adjusted to 2px */
}

a {
    color: #bfc4c9;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    border-radius: 0;
    transition: color 0.18s;
    padding: 2px 0;
    display: inline-block;
}
a:hover, a:focus {
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
}

/* Dropdown Styles */
.nav-item.dropdown {
    position: relative;
    display: inline-block; /* Ensure it takes up only necessary space */
}

.dropdown .dropbtn {
    cursor: pointer;
    /* Re-enable flexbox for better alignment of icon and text */
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    left: 0; /* Align dropdown to the left */
    border-radius: 4px;
}

.dropdown-content a {
    color: black;
    padding: 6px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Show the dropdown menu on click (controlled by JS) */
.dropdown-content.show {
    display: block;
}

.navbar-brand svg {
    vertical-align: middle;
    margin-right: 5px;
    transform: translateY(-10%); /* Adjust as needed */
}

/* Form Styles for Login/Register */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Main Content Area Styles */
/* The .content class is no longer used for the main editor layout. */

.form-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.form-container p {
    margin-bottom: 15px;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-container input[type="text"],
.form-container input[type="password"],
.form-container input[type="email"] { /* Keep email for future use or if user changes mind */
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 16px;
}

.form-container input[type="text"]:focus,
.form-container input[type="password"]:focus,
.form-container input[type="email"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

.form-container input[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.form-container input[type="submit"]:hover {
    background-color: #0056b3;
}

.form-container span.error {
    color: red;
    font-size: 14px;
    display: block;
    margin-top: -5px;
    margin-bottom: 10px;
}

.form-container .remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-container .remember-me input[type="checkbox"] {
    margin-right: 10px;
}

.form-container .small-text a {
    color: #007bff;
    text-decoration: none;
}

.form-container .small-text a:hover {
    text-decoration: underline;
}

/* Flash messages */
ul.flashes {
    list-style: none;
    padding: 10px 20px;
    margin: 20px auto;
    max-width: 800px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
}

ul.flashes li {
    margin-bottom: 5px;
}

li {
    list-style: none;
}

/* Table Styles for Management Pages (derived from profile.html) */
.common-table-style {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #2b2b2b; /* Darker background for table */
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners are applied to table contents */
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.common-table-style th {
    background-color: #393939; /* Header background */
    color: #ffc66d; /* Header text color */
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid #4a4a4a; /* Separator for header */
}

.common-table-style td {
    padding: 12px 15px;
    border-bottom: 1px solid #4a4a4a; /* Row separator */
    color: #e0e0e0; /* Body text color */
    font-size: 0.95rem;
}

.common-table-style tbody tr:last-child td {
    border-bottom: none; /* No border for the last row */
}

.common-table-style tbody tr:hover {
    background-color: #333333; /* Hover effect */
}

/* Specific styling for action buttons within tables */
.common-table-style .button-unified {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: unset;
    margin-bottom: 0;
}
.common-table-style .button-unified.view-details-btn {
    background-color: #007bff;
    color: white;
}
.common-table-style .button-unified.delete-btn {
    background-color: #dc3545;
    color: white;
} 
/* 保证导航栏在小屏幕下不换行，可横向滚动 */
@media (max-width: 768px) {
  .navbar-content, .navbar-left, .navbar-nav {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    white-space: nowrap;
  }
  .navbar-nav {
    gap: 0.5rem; /* 可选：减少间距 */
  }
  .navbar {
    min-width: 320px;
  }
}

/* 下拉菜单整体样式 */
#profile-dropdown-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 12px 0;
    min-width: 180px;
    border: none;
    right: 0;
    top: 100%;
    z-index: 1000;
    transition: box-shadow 0.2s;
}

/* 菜单项样式 */
#profile-dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 24px 10px 20px;
    font-size: 18px;
    color: #222;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: none;
}

/* 图标和文字间距 */
#profile-dropdown-content a svg {
    margin-right: 12px;
    flex-shrink: 0;
}

/* 悬停高亮 */
#profile-dropdown-content a:hover {
    background: #f5f6fa;
    color: #1976d2;
}

/* 让下拉菜单右对齐头像 */
#profile-dropdown-item {
    position: relative;
}
#profile-dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    display: none;
}

/* 鼠标移入显示 */
#profile-dropdown-item:hover #profile-dropdown-content,
#profile-dropdown-item:focus-within #profile-dropdown-content {
    display: block;
}

.vip-progress-inner {
  height: 100%;
  background: linear-gradient(90deg,#ffe7b3,#ffb347);
  border-radius: 8px 0 0 8px;
  box-shadow: 0 1px 4px #ffc66d77;
  transition: width 0.5s;
}