/* Characters Wrapper */
.characters-wrapper {
    max-width: 100%;
}

/* Search Box */
.search-box {
    background: rgba(30, 24, 18, 0.6);
    border: 1px solid #4a3f2f;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    background: rgba(20, 16, 12, 0.8);
    border: 1px solid #4a3f2f;
    border-radius: 5px;
    color: #e8dcc4;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.search-input::placeholder {
    color: #6b5d4f;
}

.btn-search {
    padding: 10px 25px;
    background: linear-gradient(135deg, #3d2f1f, #2a1f12);
    border: 2px solid #5d4a1f;
    border-radius: 5px;
    color: #d4af37;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-search:hover {
    background: linear-gradient(135deg, #5d4a1f, #3d2f1f);
    border-color: #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Alerts */
.alert-warning {
    padding: 12px 15px;
    background: rgba(240, 173, 78, 0.15);
    border: 1px solid rgba(240, 173, 78, 0.4);
    border-radius: 6px;
    color: #f0ad4e;
    font-size: 13px;
    text-align: center;
}

.alert-info {
    background-color: #222;
    border-left: 5px solid #f0c843;
    padding: 15px 20px;
    border-radius: 8px;
    color: #ccc;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Character Container */
.char-container {
    background: rgba(30, 24, 18, 0.6);
    border: 1px solid #4a3f2f;
    border-radius: 8px;
    padding: 20px;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 63, 47, 0.5);
}

/* Character Header */
.char-header {
    background: linear-gradient(135deg, rgba(40, 32, 20, 0.8), rgba(30, 24, 18, 0.8));
    border: 1px solid #4a3f2f;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.char-avatar {
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid #4a3f2f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.char-main-info {
    flex: 1;
    min-width: 200px;
}

.char-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 5px;
    word-break: break-word;
}

.char-subtitle {
    font-size: clamp(15px, 3vw, 18px);
    color: #beb5aa;
}

.char-status {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 600;
    white-space: nowrap;
}

.status-offline {
    color: #d9534f;
}

.status-online {
    color: #2ecc71;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background: rgba(40, 32, 20, 0.5);
    border: 1px solid #4a3f2f;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(50, 40, 25, 0.6);
    border-color: #5d4a1f;
}

.info-label {
    font-size: 12px;
    color: #f5f0eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
    word-break: break-word;
}

.info-value-premium {
    font-size: 16px;
    font-weight: 700;
    color: #37c572;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.skill-item {
    background: rgba(40, 32, 20, 0.5);
    border: 1px solid #4a3f2f;
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(50, 40, 25, 0.6);
    border-color: #5d4a1f;
    transform: translateY(-2px);
}

.skill-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.skill-name {
    font-size: 13px;
    color: #f5f0eb;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.skill-value {
    font-size: 16px;
    font-weight: 700;
    color: #d4af37;
}

/* Characters Table */
.table-responsive {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.chars-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin-top: 15px;
}

.chars-table thead {
    background: rgba(40, 32, 20, 0.8);
}

.chars-table th {
    padding: 12px 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #d4af37;
    text-transform: uppercase;
    border: 1px solid #4a3f2f;
    white-space: nowrap;
}

.chars-table td {
    padding: 12px 10px;
    font-size: 14px;
    color: #b8a589;
    border: 1px solid #4a3f2f;
    background: rgba(30, 24, 18, 0.4);
}

.chars-table tbody tr:hover td {
    background: rgba(40, 32, 20, 0.6);
}

.btn-view {
    padding: 6px 14px;
    background: linear-gradient(135deg, #3d2f1f, #2a1f12);
    border: 1px solid #5d4a1f;
    border-radius: 4px;
    color: #d4af37;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    white-space: nowrap;
}

.btn-view:hover {
    background: linear-gradient(135deg, #5d4a1f, #3d2f1f);
    border-color: #d4af37;
    transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */

/* Tablets */
@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }

    .chars-table {
        min-width: 550px;
    }
}

/* Tablets Small */
@media (max-width: 768px) {
    .search-box {
        padding: 15px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
        font-size: 16px;
        /* Evita zoom em iOS */
    }

    .btn-search {
        width: 100%;
    }

    .char-container {
        padding: 15px;
    }

    .char-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .char-avatar {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .char-main-info {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .info-card {
        padding: 10px;
    }

    .info-label {
        font-size: 11px;
    }

    .info-value,
    .info-value-premium {
        font-size: 14px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .skill-item {
        padding: 10px 8px;
    }

    .skill-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .skill-name {
        font-size: 12px;
    }

    .skill-value {
        font-size: 14px;
    }

    .chars-table {
        min-width: 500px;
    }

    .chars-table th,
    .chars-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .search-box {
        padding: 12px;
        border-radius: 6px;
    }

    .char-container {
        padding: 12px;
        border-radius: 6px;
    }

    .char-header {
        padding: 12px;
        gap: 12px;
    }

    .char-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .char-status {
        width: 100%;
        text-align: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .alert-info,
    .alert-warning {
        font-size: 13px;
        padding: 12px 15px;
    }

    .table-responsive {
        margin: 0 -5px;
        padding: 0 5px;
    }

    .chars-table {
        min-width: 450px;
    }

    .chars-table th,
    .chars-table td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .btn-view {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {

    .search-box,
    .char-container {
        padding: 10px;
    }

    .char-header {
        padding: 10px;
    }

    .char-avatar {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .chars-table {
        min-width: 400px;
    }

    .chars-table th,
    .chars-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
}

/* Scroll customizado para tabela */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}