/* Community RPG Frontend Styles */

/* Global Styles */
.crpg-notice {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
    background: #f0f6fc;
}

.crpg-notice.crpg-success {
    border-left-color: #00a32a;
    background: #f0fdf4;
    color: #166534;
}

.crpg-notice.crpg-error {
    border-left-color: #d63638;
    background: #fef2f2;
    color: #991b1b;
}

.crpg-notice.crpg-info {
    border-left-color: #2271b1;
    background: #f0f6fc;
    color: #1e3a8a;
}

/* Buttons */
.crpg-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.crpg-btn-primary {
    background: #2271b1;
    color: white;
}

.crpg-btn-primary:hover {
    background: #135e96;
    transform: translateY(-2px);
}

.crpg-btn-secondary {
    background: #6c757d;
    color: white;
}

.crpg-btn-secondary:hover {
    background: #5a6268;
}

.crpg-btn-danger {
    background: #d63638;
    color: white;
}

.crpg-btn-buy {
    background: #00a32a;
    color: white;
    width: 100%;
}

.crpg-btn-buy:hover {
    background: #008a24;
}

.crpg-btn-sell {
    background: #dba617;
    color: white;
    width: 100%;
    margin-top: 5px;
}

/* Dashboard */
.crpg-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.crpg-avatar-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.crpg-avatar-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.crpg-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2271b1;
}

.crpg-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.crpg-avatar-info h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.crpg-level-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
}

.crpg-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.crpg-stat-box {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.crpg-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.crpg-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 10px;
}

.crpg-hp-bar, .crpg-xp-bar {
    position: relative;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.crpg-hp-fill, .crpg-xp-fill {
    height: 100%;
    transition: width 0.5s;
    border-radius: 10px;
}

.crpg-hp-fill {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.crpg-xp-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.crpg-hp-bar span, .crpg-xp-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.crpg-combat-stats, .crpg-resistances {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.crpg-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.crpg-stat-row:last-child {
    border-bottom: none;
}

.crpg-resistances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.crpg-res-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    text-align: center;
}

.crpg-equipped-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.crpg-equipped-item {
    text-align: center;
}

.crpg-equipped-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #2271b1;
}

.crpg-skillpoints-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    color: white;
}

.crpg-skillpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.crpg-btn-skill {
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.crpg-btn-skill:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Battle Page */
.crpg-battle-section {
    max-width: 1400px;
    margin: 0 auto;
}

.crpg-boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.crpg-boss-card {
    position: relative;
}

.crpg-boss-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.crpg-boss-card label {
    display: block;
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.crpg-boss-card input:checked + label {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
    transform: scale(1.05);
}

.crpg-boss-tier {
    background: #2271b1;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 15px;
}

.crpg-boss-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.crpg-boss-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    margin-bottom: 15px;
}

.crpg-boss-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    font-size: 14px;
}

.crpg-boss-rewards {
    background: #f0fdf4;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.crpg-focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.crpg-focus-option {
    display: block;
}

.crpg-focus-option input {
    position: absolute;
    opacity: 0;
}

.crpg-focus-option div {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.crpg-focus-option input:checked + div {
    border-color: #2271b1;
    background: #f0f6fc;
}

.crpg-battle-history {
    margin-top: 30px;
}

.crpg-history-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #e5e7eb;
}

.crpg-result-won {
    border-left-color: #00a32a;
}

.crpg-result-lost {
    border-left-color: #d63638;
}

.crpg-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.crpg-result-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    background: #f0fdf4;
    color: #166534;
}

/* Shop */
.crpg-shop {
    max-width: 1400px;
    margin: 0 auto;
}

.crpg-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.crpg-gold-display {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
}

.crpg-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.crpg-shop-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-align: center;
}

.crpg-shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.crpg-item-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.crpg-item-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.crpg-item-stats {
    margin: 15px 0;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.crpg-item-price {
    font-size: 24px;
    font-weight: bold;
    color: #f59e0b;
    margin: 15px 0;
}

/* Inventory */
.crpg-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.crpg-inventory-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.crpg-equipped {
    border: 3px solid #00a32a;
}

.crpg-equipped-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00a32a;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.crpg-quantity {
    background: #2271b1;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    display: inline-block;
    margin: 10px 0;
    font-size: 12px;
    font-weight: bold;
}

.crpg-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

/* Leaderboard */
.crpg-leaderboard-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.crpg-leaderboard-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.crpg-leaderboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.crpg-leaderboard-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.crpg-leaderboard-table tr:hover {
    background: #f9fafb;
}

.crpg-current-user {
    background: #f0fdf4 !important;
    font-weight: bold;
}

.crpg-leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
}

.crpg-badge-you {
    background: #00a32a;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 10px;
}

.crpg-rank {
    font-size: 24px;
    font-weight: bold;
}

/* Profile */
.crpg-profile {
    max-width: 1000px;
    margin: 0 auto;
}

.crpg-profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.crpg-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
}

.crpg-profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.crpg-profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.crpg-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.crpg-stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.crpg-profile-attributes {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.crpg-attr-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.crpg-attr-label {
    width: 180px;
    font-weight: 500;
}

.crpg-attr-bar {
    flex: 1;
    position: relative;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
}

.crpg-attr-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 15px;
    transition: width 0.5s;
}

.crpg-attr-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.crpg-attr-value {
    font-weight: bold;
    font-size: 18px;
}

.crpg-battle-log {
    margin-top: 10px;
}

.crpg-battle-log pre {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .crpg-stats-grid,
    .crpg-shop-grid,
    .crpg-inventory-grid,
    .crpg-boss-grid {
        grid-template-columns: 1fr;
    }
    
    .crpg-avatar-header {
        flex-direction: column;
        text-align: center;
    }
    
    .crpg-profile-header {
        flex-direction: column;
        text-align: center;
    }
}
.crpg-player-link-name:hover {
    color: #66c0f4; /* Steam-Blau oder deine Theme-Farbe */
    text-decoration: underline;
}