/* --- Global Styles & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Orbitron:wght@700&display=swap');

:root {
    --primary-color: #ffd700; /* Gold */
    --primary-hover: #e6c300;
    --secondary-color: #4a5568; /* Gray */
    --secondary-hover: #2d3748;
    --accent-color: #00e5ff; /* Bright Cyan */
    --background-dark: #0d1117; /* Very Dark Blue/Gray */
    --background-medium: #161b22; /* Darker Gray */
    --background-light: #21262d; /* Lighter Gray */
    --text-primary: #c9d1d9; /* Light Gray */
    --text-secondary: #8b949e; /* Medium Gray */
    --border-color: #30363d;
    --success-color: #2ea043;
    --warning-color: #fca311;
    --error-color: #da3633;
    --legendary-glow: #ff8000; /* Orange/Gold for Legendary */
    --rare-glow: #4b0082; /* Purple for Rare */
    --common-glow: #1e90ff; /* Blue for Common */

    --font-body: 'Noto Sans SC', sans-serif;
    --font-heading: 'Orbitron', sans-serif; /* Techy/Gamey Font */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px rgba(var(--primary-rgb, 255, 215, 0), 0.5); /* Define primary-rgb if needed */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: linear-gradient(rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.95)); /* Add a subtle background image if you have one */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(22, 27, 34, 0.85); /* Semi-transparent */
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 700;
    transition: transform 0.3s ease;
}
.logo span {
    color: var(--primary-color); /* Highlight part of the logo */
}
.logo:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: var(--text-primary);
}
.nav-links a:hover::after {
    width: 100%;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .welcome-msg {
    color: var(--text-secondary);
    margin-right: 10px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-dark);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.copy-btn {
    padding: 5px 10px;
    margin-left: 10px;
    font-size: 0.8rem;
    background-color: var(--background-light);
    color: var(--text-secondary);
    min-width: 40px; /* Ensure space for icon */
}
.copy-btn:hover {
    background-color: var(--secondary-color);
    color: var(--text-primary);
}
.copy-btn svg {
    vertical-align: middle;
}

/* --- Main Content --- */
main.container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* --- Probability Info --- */
.probability-info {
    background: linear-gradient(135deg, var(--background-medium), var(--background-light));
    border-left: 5px solid var(--accent-color);
    padding: 15px 25px;
    margin: 0 auto 40px auto;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden; /* For pseudo-element animation */
}

.info-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative; /* Ensure text is above animated background */
    z-index: 2;
}
.info-icon {
    margin-right: 10px;
    color: var(--accent-color);
    font-size: 1.2em; /* Make icon slightly larger */
    vertical-align: middle;
}

/* Subtle background animation */
.animated-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.1), transparent);
    animation: shimmer 4s infinite linear;
    z-index: 1;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}


/* --- Cases Grid & Cards --- */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.case-card {
    background-color: var(--background-medium);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative; /* For glow */
}

.case-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

.case-img-wrapper {
    height: 220px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, var(--background-light) 0%, var(--background-medium) 70%);
    position: relative; /* Needed for glow */
}

.case-img {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain; /* Ensure image fits well */
    transition: transform 0.4s ease;
}

.case-card:hover .case-img {
    transform: scale(1.1);
}

/* Rarity Glow Effect */
.case-rarity-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; /* Larger than image */
    height: 120%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1; /* Behind image */
    filter: blur(30px); /* Soft glow */
    background-color: var(--primary-color); /* Default glow */
}
/* Specific Rarity Glows (Add classes like common-glow, rare-glow, legendary-glow to the div) */
.case-rarity-glow.common-glow { background-color: var(--common-glow); }
.case-rarity-glow.rare-glow { background-color: var(--rare-glow); }
.case-rarity-glow.legendary-glow { background-color: var(--legendary-glow); }

.case-card:hover .case-rarity-glow {
    opacity: 0.4; /* Show glow on hover */
}


.case-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--background-light);
    border-top: 1px solid var(--border-color);
}

.case-name {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1.3rem;
    min-height: 2.6rem; /* Ensure consistent height */
}

.case-price {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 700;
    font-family: var(--font-body); /* Use body font for price */
}

.open-btn {
    width: 90%;
    margin: 0 auto;
}

/* --- Overlays & Modals --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.9); /* Darker, more opaque */
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s; /* Delay visibility change */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.modal-container {
    background-color: var(--background-medium);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 550px;
    width: 90%;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative; /* For close button */
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.4s ease; /* Bounce + Fade */
    opacity: 0;
}

.overlay.active .modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.close-btn-corner {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}
.close-btn-corner:hover {
    color: var(--error-color);
    transform: rotate(90deg);
}

/* --- Prize Modal Specifics --- */
.prize-container .modal-title {
    color: var(--success-color); /* Green for success */
    text-shadow: 0 0 10px rgba(46, 160, 67, 0.7);
}
.prize-img {
    max-width: 70%;
    margin: 10px auto 20px auto;
    border-radius: 8px;
    background: radial-gradient(circle, var(--background-light) 0%, transparent 70%);
    padding: 10px;
}
.prize-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.prize-rarity {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 25px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}
/* Add classes for different rarities */
.prize-rarity.common { color: #fff; background-color: var(--common-glow); }
.prize-rarity.rare { color: #fff; background-color: var(--rare-glow); }
.prize-rarity.legendary { color: #fff; background-color: var(--legendary-glow); }


/* --- Purchase Modal Specifics --- */
.purchase-form {
    margin-top: 20px;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--background-dark);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}
/* Style for number input spinner */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 0.3;
}

.total-price-display {
    text-align: right;
    font-size: 1.1rem;
    margin-top: 10px;
}
.price-highlight {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.3em; /* Make price stand out */
}

/* --- Payment Modal Specifics --- */
.payment-info {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.8;
}
.payment-info p {
    margin-bottom: 15px;
}
.payment-info strong {
    color: var(--text-secondary);
    min-width: 100px; /* Align values */
    display: inline-block;
}
.info-highlight {
    color: var(--accent-color);
    font-weight: 600;
}
.warning-text {
    color: var(--warning-color);
    font-weight: bold;
    background-color: rgba(252, 163, 17, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid var(--warning-color);
}
.warning-text .info-icon { color: var(--warning-color); }

.address-container {
    display: flex;
    align-items: center;
    background-color: var(--background-dark);
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin: 10px 0 20px 0;
}
#payment-address {
    flex-grow: 1;
    font-family: monospace;
    color: var(--text-primary);
    word-break: break-all; /* Wrap long addresses */
    margin-right: 10px;
    font-size: 0.9rem;
}

.status-text {
    color: var(--text-secondary);
}
.status-text .info-icon {
    color: var(--accent-color);
    animation: spin 2s linear infinite; /* Loading spinner */
}
.payment-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}
.payment-status.success { background-color: rgba(46, 160, 67, 0.1); border-left: 3px solid var(--success-color); color: var(--success-color);}
.payment-status.pending { background-color: rgba(252, 163, 17, 0.1); border-left: 3px solid var(--warning-color); color: var(--warning-color);}
.payment-status.error { background-color: rgba(218, 54, 51, 0.1); border-left: 3px solid var(--error-color); color: var(--error-color);}


/* --- Utility & Animations --- */
.button-group {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Apply fade in to cards */
.case-card {
    opacity: 0; /* Start hidden */
    animation: fadeIn 0.5s ease-out forwards;
}
/* Stagger animation for grid items */
.cases-grid .case-card:nth-child(1) { animation-delay: 0.1s; }
.cases-grid .case-card:nth-child(2) { animation-delay: 0.2s; }
.cases-grid .case-card:nth-child(3) { animation-delay: 0.3s; }
/* Add more delays if needed */
.cases-grid .case-card:nth-child(4) { animation-delay: 0.4s; }
.cases-grid .case-card:nth-child(5) { animation-delay: 0.5s; }
.cases-grid .case-card:nth-child(6) { animation-delay: 0.6s; }


/* --- Responsive Design (Basic Example) --- */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; }
    .nav-links { margin-top: 10px; }
    .section-title { font-size: 2.2rem; }
    .cases-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
    .modal-container { padding: 20px; max-width: 95%; }
    .modal-title { font-size: 1.5rem; }
    .button-group { flex-direction: column; gap: 10px; }
    .btn { width: 100%; }
    .copy-btn { margin-left: 5px; }
    #payment-address { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.5rem; }
    .nav-links { gap: 15px; }
    .user-panel .btn { padding: 8px 15px; font-size: 0.85rem;}
    .case-card { border-radius: 8px; }
    .case-img-wrapper { height: 180px; }
    .case-name { font-size: 1.1rem; }
    .case-price { font-size: 1.2rem; }
}

/* --- Authentication Page Styles (Add to your existing style.css) --- */

.auth-container {
    max-width: 450px; /* 比之前的 modal 稍宽一点 */
    margin: 60px auto; /* 上下边距增加 */
    padding: 30px 40px; /* 内边距参考 modal */
    background-color: var(--background-medium); /* 使用主题背景色 */
    border-radius: 12px; /* 使用主题圆角 */
    box-shadow: var(--shadow-lg); /* 使用主题阴影 */
    border: 1px solid var(--border-color); /* 使用主题边框色 */
    animation: fadeIn 0.5s ease-out; /* 添加淡入动画 */
}

.auth-title {
    font-family: var(--font-heading); /* 使用标题字体 */
    font-size: 2rem; /* 调整字号 */
    color: var(--primary-color); /* 使用主题主色 */
    text-align: center;
    margin-bottom: 30px; /* 增加下边距 */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* 复用 purchase modal 的 form-group, label, form-input 样式 */
/* 如果需要微调可以覆盖 */
.auth-container .form-group {
    margin-bottom: 20px; /* 统一边距 */
}

.auth-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 确保 form-input 样式适用于 auth 页面 */
.auth-container .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--background-dark);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.auth-container .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 255, 215, 0), 0.2); /* 需要定义 --primary-rgb 或直接用 rgba(255, 215, 0, 0.2) */
}

/* Remember Me Checkbox Styling */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px; /* 调整与按钮的距离 */
}

.remember-me input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    /* 可选：稍微美化 checkbox */
    appearance: none;
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    width: 16px;
    height: 16px;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.remember-me input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 添加 ✓ 标记 */
.remember-me input[type="checkbox"]:checked::after {
    content: '\2713'; /* Checkmark character */
    font-size: 12px;
    color: var(--background-dark);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}


.remember-me label {
    color: var(--text-secondary); /* 使用次要文字颜色 */
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none; /* 防止文本被选中 */
    margin-bottom: 0; /* 覆盖 form-group label 的边距 */
}

/* Full Width Button Utility */
.btn-full-width {
    width: 100%;
    display: block; /* 确保按钮占满整行 */
    padding: 12px 25px; /* 稍微调整按钮大小 */
    font-size: 1rem;
}

/* Auth Links Styling */
.auth-links {
    text-align: center;
    margin-top: 25px; /* 调整与按钮的距离 */
    font-size: 0.9rem;
}

.auth-links p {
    margin: 0;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--accent-color); /* 使用主题强调色 */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--primary-color); /* 悬停时变为主色 */
    text-decoration: underline;
}

/* Alert Message Styling (Consistent Theme) */
.alert {
    padding: 12px 18px;
    margin-bottom: 20px;
    border-radius: 6px; /* 使用主题圆角 */
    border: 1px solid transparent;
    display: flex; /* 使用 flex 对齐图标和文字 */
    align-items: center;
    font-size: 0.95rem;
}
.alert .info-icon { /* 样式化消息图标 */
    margin-right: 10px;
    font-size: 1.2em; /* 图标稍大 */
}

.alert-danger {
    color: #f8d7da; /* 浅红色文字 */
    background-color: rgba(var(--error-rgb, 218, 54, 51), 0.2); /* 半透明红色背景，需定义 --error-rgb */
    border-color: rgba(var(--error-rgb, 218, 54, 51), 0.3);
    border-left: 4px solid var(--error-color); /* 左侧实色边框 */
}
.alert-danger .info-icon { color: var(--error-color); } /* 图标颜色 */

.alert-success {
    color: #d1e7dd; /* 浅绿色文字 */
    background-color: rgba(var(--success-rgb, 46, 160, 67), 0.15); /* 半透明绿色背景，需定义 --success-rgb */
    border-color: rgba(var(--success-rgb, 46, 160, 67), 0.3);
    border-left: 4px solid var(--success-color);
}
.alert-success .info-icon { color: var(--success-color); }

.alert-info { /* 添加 Info 样式 */
    color: #cff4fc; /* 浅蓝色文字 */
    background-color: rgba(var(--accent-rgb, 0, 229, 255), 0.1); /* 半透明强调色背景，需定义 --accent-rgb */
    border-color: rgba(var(--accent-rgb, 0, 229, 255), 0.2);
    border-left: 4px solid var(--accent-color);
}
.alert-info .info-icon { color: var(--accent-color); }

/* Field Error Styling */
.field-error {
    color: var(--error-color); /* 使用错误颜色 */
    font-size: 0.85em; /* 稍小字体 */
    margin-top: 5px;
    display: block; /* 确保独占一行 */
}

/* 定义颜色变量的 RGB 版本 (如果尚未定义) */
:root {
    /* ... 其他变量 ... */
    --primary-rgb: 255, 215, 0;
    --error-rgb: 218, 54, 51;
    --success-rgb: 46, 160, 67;
    --accent-rgb: 0, 229, 255;
}

/* 响应式调整 (可选) */
@media (max-width: 576px) {
    .auth-container {
        margin: 30px auto;
        padding: 20px;
        max-width: 90%;
    }
    .auth-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
}

/* --- My Keys Page Styles (Add to style.css) --- */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px; /* Increased margin */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px; /* Add gap between title and controls */
}

.section-header .section-title {
    margin-bottom: 0; /* Remove bottom margin when in flex layout */
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between controls */
    flex-wrap: wrap; /* Allow controls to wrap */
}

.search-input {
    /* form-input class provides base styles */
    min-width: 220px; /* Give search input a decent width */
}

/* Define .btn-info if not already defined (Example: Blue button) */
.btn-info {
    background-color: #3498db; /* Example Blue */
    color: #fff;
    border-color: #2980b9;
}
.btn-info:hover {
    background-color: #2980b9;
    border-color: #1f618d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Keys Container & Grid */
.keys-container {
    margin: 40px 0;
}

.keys-grid {
    display: grid;
    /* Adjust columns for responsiveness */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px; /* Space between key cards */
}

/* Key Card Styling */
.key-card {
    background-color: var(--background-medium);
    border-radius: 8px; /* Slightly softer corners */
    padding: 20px 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column; /* Stack info and actions vertically */
    gap: 15px; /* Space between info and actions */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.key-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.key-info {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between detail lines */
    flex-grow: 1; /* Take available space */
}

.key-detail {
    display: flex; /* Align label and value */
    align-items: baseline; /* Align text baseline */
    font-size: 0.95rem;
    line-height: 1.5;
}

.detail-label {
    color: var(--text-secondary);
    min-width: 80px; /* Align values */
    font-weight: 600;
    margin-right: 10px;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-all; /* Break long keys/IDs */
}

.code-block {
    font-family: monospace;
    background-color: var(--background-dark);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    color: var(--accent-color); /* Highlight code */
}

.price-highlight {
    font-weight: 700;
    color: var(--primary-color); /* Use gold for price */
    font-size: 1.1em;
}

.date-value {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.key-actions {
    text-align: right; /* Align button to the right */
    margin-top: 10px; /* Add some space above the button */
}

.btn-copy {
    /* Adjust padding for icon button */
    padding: 8px 15px;
}
.btn-copy svg {
    vertical-align: middle;
    margin-right: 8px;
}
.btn-copy.copied { /* Style for copied state */
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: #fff;
}

/* No Keys Message Styling */
.no-keys-message {
    /* Uses .alert.alert-info */
    text-align: center;
    padding: 30px 20px;
    margin: 40px 0; /* Give it space */
}

/* Modal Content Adjustments */
.modal-container .modal-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.search-result-text .alert {
    text-align: left; /* Align text left in results */
    border-left: none; /* Remove extra border inside modal */
    background-color: transparent; /* Clear background */
    border: none;
    padding: 0;
    margin: 0;
}
.search-result-text .alert p { margin-bottom: 10px; }
.search-result-text .alert code { color: var(--accent-color); }
.search-result-text .alert .price-highlight { color: var(--primary-color); font-weight: bold; }


#updateResult .alert { /* Style for update result box */
    margin-top: 15px;
    text-align: left;
    padding: 15px;
}

/* Screen reader only class */
.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;  /* 2 */
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important; /* 3 */
}

/* Footer Styles (Add if not already present) */
footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background-color: var(--background-medium);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start; /* Align items to start */
    }
    .controls-group {
        width: 100%; /* Make controls take full width */
        justify-content: flex-start; /* Align controls to start */
    }
    .keys-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
        gap: 20px;
    }
    .search-input {
        min-width: 150px;
        flex-grow: 1; /* Allow input to grow */
    }
}

@media (max-width: 480px) {
    .key-card {
        padding: 15px;
    }
    .detail-label {
        min-width: 70px;
        font-size: 0.9rem;
    }
    .controls-group .btn, .controls-group .form-input {
        width: 100%; /* Stack controls vertically */
        margin-bottom: 10px;
    }
    .controls-group {
        gap: 0;
    }
    .key-actions .btn {
        width: 100%;
    }
}