/* resources/views/profile/index.blade.php або public/css/profile.css */

.profile-page {
    background: #080c10;
    min-height: 85vh;
    padding: 50px 20px;
    box-sizing: border-box;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.profile-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #0d1218;
    border-radius: 16px;
    border: 1px solid rgba(0, 210, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    padding: 35px;
    width: 100%;
    box-sizing: border-box;
}

.profile-header {
    margin-bottom: 35px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}

.profile-title span {
    color: #00d2ff;
    text-shadow: 0 0 15px rgba(0,210,255,0.25);
}

.profile-subtitle {
    margin: 5px 0 0 0;
    color: #6b7c96;
    font-size: 14px;
}

.profile-email {
    color: #8a99ad;
    font-size: 14px;
    background: rgba(255,255,255,0.03);
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 500;
}

/* Стан порожнього кабінету */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: #6b7c96;
    background: rgba(255,255,255,0.01);
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.08);
}

.empty-state icon {
    font-size: 45px;
    margin-bottom: 15px;
    display: block;
}

.empty-state h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: #8a99ad;
    font-size: 14px;
}

.btn-primary {
    display: inline-block;
    margin-top: 20px;
    background: #00d2ff;
    color: #080c10;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: #00b8e6;
}

/* Таблиця результатів */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.attempts-table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0 15px;
    text-align: left;
}

.attempts-table th {
    padding: 12px 20px;
    color: #6b7c96;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.attempt-row {
    background: rgba(255, 255, 255, 0.02);
}

.attempt-cell-info {
    padding: 18px 20px;
    border-radius: 10px 0 0 10px;
    border: 1px solid rgba(255,255,255,0.03);
    border-right: none;
}

.topic-badge {
    font-size: 12px;
    color: #6b7c96;
    margin-bottom: 3px;
    font-weight: 600;
}

.quiz-title {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.attempt-cell-date {
    padding: 18px 20px;
    text-align: center;
    color: #8a99ad;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.attempt-cell-score {
    padding: 18px 20px;
    text-align: center;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.attempt-cell-score .correct-num {
    color: #00d2ff;
    font-weight: 700;
}

.attempt-cell-score .total-num {
    color: #6b7c96;
}

.attempt-cell-badge {
    padding: 18px 20px;
    text-align: right;
    border-radius: 0 10px 10px 0;
    border: 1px solid rgba(255,255,255,0.03);
    border-left: none;
}

.score-badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    min-width: 55px;
    text-align: center;
}

/* Статуси баджів успішності */
.badge-success { background: rgba(46, 213, 115, 0.12); color: #2ed573; border: 1px solid rgba(46, 213, 115, 0.25); }
.badge-warning { background: rgba(255, 165, 2, 0.12); color: #ffa502; border: 1px solid rgba(255, 165, 2, 0.25); }
.badge-danger  { background: rgba(255, 71, 87, 0.12); color: #ff4757; border: 1px solid rgba(255, 71, 87, 0.25); }

/* Деталізація клітинок */
.details-wrapper {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px 16px;
}

.details-wrapper summary {
    color: #8a99ad;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.details-wrapper summary::-webkit-details-marker {
    display: none;
}

.details-wrapper summary:hover {
    color: #00d2ff;
}

.cells-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* Клітинка питання */
.user-q-cell {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

/* Кольори клітинок */
.cell-correct { background: rgba(46, 213, 115, 0.15); border: 1px solid #2ed573; color: #2ed573; }
.cell-incorrect { background: rgba(255, 71, 87, 0.15); border: 1px solid #ff4757; color: #ff4757; }
.cell-skipped { background: rgba(108, 117, 125, 0.2); border: 1px solid rgba(108, 117, 125, 0.4); color: #9ba4b0; }

/* Спливаюча підказка (Tooltip) */
.user-q-tooltip {
    display: none;
    position: absolute;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%);
    background: #151a24;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    width: 260px;
    padding: 12px;
    border-radius: 10px;
    z-index: 99;
    text-align: left;
    pointer-events: none;
}

.user-q-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #151a24 transparent transparent transparent;
}

.user-q-cell:hover .user-q-tooltip {
    display: block;
}

.tooltip-header {
    font-weight: 700;
    margin-bottom: 6px;
    color: #00d2ff;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.tooltip-text {
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 13px;
    font-weight: 400;
    max-height: 80px;
    overflow-y: auto;
}

.tooltip-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 6px;
    font-size: 12px;
    font-weight: 500;
}

.tooltip-footer p {
    margin: 2px 0;
    color: #8a99ad;
}