/* =====================================
   Premium Profile Card Styles
   1080 x 1350 social-media format
   ===================================== */

/* Card base — target ratio maintained via aspect-ratio */
.profile-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1080 / 1350;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 2px solid var(--card-border);
    box-shadow: var(--shadow-lg), 0 0 50px var(--card-glow);
    overflow: hidden;
    padding: 0;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent);
    z-index: 2;
}

.profile-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, var(--card-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.card-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -80px;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 70%);
}

.bg-shape-2 {
    width: 180px;
    height: 180px;
    bottom: 20px;
    left: -60px;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 70%);
}

.card-wrapper {
    position: relative;
    z-index: 1;
    padding: 28px 24px 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.card-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.card-top-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-theme-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--card-accent);
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid var(--card-border);
}

.card-issue-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--card-accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    letter-spacing: 1px;
}

.card-design-elements {
    position: absolute;
    top: -22px;
    right: -14px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Photo */
.card-photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.profile-image-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--card-accent);
    background: var(--bg-surface);
    box-shadow: 0 0 20px var(--card-glow);
    position: relative;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder svg {
    width: 65%;
    height: 65%;
    color: var(--text-muted);
}

/* Identity */
.card-identity-section {
    text-align: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.card-display-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--card-text);
    letter-spacing: -0.5px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-social-handle {
    font-size: 14px;
    color: var(--card-accent);
    font-weight: 500;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Entity sections */
.card-entity-section {
    padding: 12px 0;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}

.entity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.entity-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.goat-label {
    background: var(--card-accent);
    color: #0a0a12;
    padding: 3px 8px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    font-size: 10px;
}

.entity-crest {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
}

.entity-crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.entity-crest svg {
    width: 60%;
    height: 60%;
    color: var(--card-accent);
}

.entity-crest.crest-sm {
    width: 30px;
    height: 30px;
}

.entity-crest.crest-xs {
    width: 22px;
    height: 22px;
}

.entity-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
}

.entity-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entity-photo svg {
    width: 60%;
    height: 60%;
    color: var(--card-accent);
}

.entity-photo.mini {
    width: 26px;
    height: 26px;
}

.entity-name-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.entity-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--card-text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.entity-team {
    font-size: 12px;
    color: var(--card-accent);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Secondary players */
.card-secondary-players {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}

.secondary-player-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.secondary-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--card-accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

.secondary-value-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.secondary-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--card-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Match section */
.card-match-section {
    margin-top: 14px;
    padding: 14px 0 0;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}

.match-banner {
    margin-bottom: 10px;
}

.section-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--card-accent);
}

.goal-tag {
    background: var(--card-accent);
    color: #0a0a12;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-block;
}

.match-display-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.match-team-block {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.team-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--card-text);
    text-align: center;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 0 8px;
}

.match-score-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--card-accent);
    line-height: 1;
}

.match-score-value.venue {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.match-vs-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    margin: 2px 0;
}

.match-meta-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.meta-item {
    font-size: 11px;
    color: var(--card-accent);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Goal section */
.card-goal-section {
    margin-top: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.goal-banner {
    margin-bottom: 10px;
}

.goal-content {
    text-align: left;
}

.goal-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.goal-scorer-block {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.goal-scorer-text {
    min-width: 0;
}

.goal-scorer-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--card-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-scorer-sub {
    font-size: 11px;
    color: var(--card-accent);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-score-badge {
    padding: 6px 12px;
    background: var(--card-accent);
    color: #0a0a12;
    font-weight: 800;
    font-size: 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.goal-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.goal-team-block {
    display: flex;
    align-items: center;
    gap: 5px;
}

.goal-team {
    font-size: 12px;
    color: var(--card-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-team.opponent {
    color: var(--text-muted);
}

.goal-vs {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.goal-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.goal-description {
    font-size: 12px;
    color: var(--card-text);
    font-style: italic;
    line-height: 1.4;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goal-why {
    font-size: 11px;
    color: var(--card-accent);
    line-height: 1.4;
}

.why-label {
    font-weight: 700;
    margin-right: 4px;
}

/* Identity row */
.card-identity-section-2 {
    margin-top: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}

.identity-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.identity-item {
    text-align: center;
    padding: 6px 2px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.identity-label {
    display: block;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.identity-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--card-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.identity-value.shirt-value {
    color: var(--card-accent);
    font-size: 14px;
}

/* Preferences */
.card-preferences-section {
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.pref-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.pref-with-crest {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pref-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--card-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bio */
.card-bio-section {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.bio-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.bio-text {
    font-size: 11px;
    color: var(--card-text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.card-footer-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
    flex-shrink: 0;
}

.card-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-logo {
    width: 20px;
    height: 20px;
    color: var(--card-accent);
}

.brand-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .profile-card { max-width: 340px; }
}

@media (max-width: 768px) {
    .profile-card {
        max-width: 100%;
        border-radius: var(--radius-lg);
    }
    .card-wrapper { padding: 20px 16px 18px; }
    .card-display-name { font-size: 24px; }
    .entity-name { font-size: 14px; }
    .match-display-section { flex-direction: column; gap: 6px; }
    .match-score-block { flex-direction: row; padding: 4px 0; }
    .goal-main-row { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .profile-card { border-radius: var(--radius-md); }
    .card-wrapper { padding: 14px 12px 14px; }
    .card-display-name { font-size: 20px; }
    .profile-image-container { width: 80px; height: 80px; }
    .identity-row { grid-template-columns: repeat(2, 1fr); }
    .match-display-section { gap: 4px; }
    .card-goal-section { padding: 10px; }
    .card-entity-section { padding: 8px 0; }
}
