/* AWS Token 提取工具样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    margin-top: 15px;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3344;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-group .btn {
    flex: 1;
    width: auto;
}

/* 进度条 */
.progress-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.queue-info {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 10px;
}

/* 结果显示 */
#result-title.success {
    color: #2ed573;
}

#result-title.error {
    color: #ff4757;
}

.token-box {
    margin-bottom: 20px;
}

.token-box label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.token-box textarea {
    width: 100%;
    height: 80px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    resize: none;
    background: #f8f9fa;
}

.token-box.password-updated {
    background: #fff8e6;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ffc107;
}

.token-box.password-updated label {
    color: #856404;
}

.token-box.password-updated textarea {
    height: 60px;
    background: #fffef5;
    border-color: #ffc107;
}

.error-message {
    color: #ff4757;
    padding: 15px;
    background: #fff5f5;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 管理后台样式 */
.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    padding: 15px;
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #999;
    font-size: 14px;
}

.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-inline input {
    width: 100px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.code-list {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.code-list h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.code-list textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.filter-bar {
    margin-bottom: 15px;
}

.filter-bar select {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.codes-table {
    overflow-x: auto;
}

.codes-table table {
    width: 100%;
    border-collapse: collapse;
}

.codes-table th,
.codes-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.codes-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.codes-table code {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge.unused {
    background: #d4edda;
    color: #155724;
}

.badge.used {
    background: #f8d7da;
    color: #721c24;
}

.empty {
    text-align: center;
    color: #999;
    padding: 30px;
}

#queue-status p {
    margin-bottom: 8px;
    color: #666;
}

footer {
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .codes-table {
        font-size: 12px;
    }
    
    .codes-table th,
    .codes-table td {
        padding: 8px 5px;
    }
}
