/**
 * VOID_ID_CARD - シェア用カード画像スタイル
 * サイバーパンクな身分証明書デザイン
 */

/* =================================
   Card Container
   ================================= */
.void-card-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(10px);
    padding: 60px 10px 20px 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.void-card-container.visible {
    display: flex;
}

/* スマホ向けコンテナ調整 */
@media (max-width: 480px) {
    .void-card-container {
        padding: 60px 8px 20px 8px;
        justify-content: flex-start;
        gap: 16px;
    }
}

/* =================================
   Card Wrapper (for capture)
   ================================= */
.void-card-wrapper {
    position: relative;
    width: 1200px;
    height: 630px;
    transform-origin: center center;
}

/* Responsive scaling */
@media (max-width: 1280px) {
    .void-card-wrapper {
        transform: scale(0.8);
    }
}

@media (max-width: 1024px) {
    .void-card-wrapper {
        transform: scale(0.6);
    }
}

@media (max-width: 768px) {
    .void-card-wrapper {
        transform: scale(0.45);
    }
}

@media (max-width: 500px) {
    .void-card-wrapper {
        transform: scale(0.28);
        margin-top: -50px;
    }
}

@media (max-width: 400px) {
    .void-card-wrapper {
        transform: scale(0.24);
        margin-top: -70px;
    }
}

@media (max-width: 350px) {
    .void-card-wrapper {
        transform: scale(0.2);
        margin-top: -90px;
    }
}

/* =================================
   Main Card
   ================================= */
.void-card {
    position: relative;
    width: 1200px;
    height: 630px;
    background: #0a0a0f;
    border: 2px solid rgba(0, 255, 255, 0.3);
    overflow: hidden;
    font-family: 'Courier New', Consolas, monospace;
    box-shadow:
        0 0 60px rgba(0, 255, 255, 0.15),
        inset 0 0 100px rgba(0, 255, 255, 0.03);
}

/* Scanlines overlay */
.void-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.015) 2px,
        rgba(0, 255, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 10;
}

/* Noise texture overlay */
.void-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 11;
}

/* Grid pattern background */
.void-card-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* =================================
   Left Section - Identity Preview
   ================================= */
.void-card-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(0, 255, 255, 0.15);
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.02) 0%,
        transparent 50%,
        rgba(255, 0, 255, 0.02) 100%
    );
}

/* Identity avatar container */
.void-card-avatar {
    position: relative;
    width: 280px;
    height: 340px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glow ring behind avatar */
.void-card-avatar-glow {
    position: absolute;
    width: 260px;
    height: 320px;
    border-radius: 8px;
    background: radial-gradient(
        ellipse at center,
        var(--card-glow-color, rgba(0, 255, 255, 0.3)) 0%,
        transparent 70%
    );
    filter: blur(30px);
    animation: card-pulse 3s ease-in-out infinite;
}

@keyframes card-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

/* Identity figure */
.void-card-figure {
    position: relative;
    width: 160px;
    height: 200px;
    z-index: 2;
}

/* Hexagon frame around avatar */
.void-card-hex-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: 1;
}

/* Status indicator */
.void-card-status {
    position: absolute;
    bottom: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(0, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.void-card-status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
    animation: status-blink 2s ease-in-out infinite;
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =================================
   Right Section - Info Panel
   ================================= */
.void-card-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 780px;
    height: calc(100% - 100px); /* ボトムセクション分を除く */
    padding: 30px 50px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.void-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.void-card-classified {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.void-card-classified::before {
    content: '// ';
    color: rgba(0, 255, 255, 0.5);
}

.void-card-logo {
    font-size: 12px;
    color: rgba(0, 255, 255, 0.5);
    text-align: right;
    line-height: 1.4;
}

/* Identity Name */
.void-card-name {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 12px;
    text-shadow:
        0 0 20px var(--card-glow-color, rgba(0, 255, 255, 0.5)),
        0 0 40px var(--card-glow-color, rgba(0, 255, 255, 0.3));
    line-height: 1.1;
}

/* Rarity Badge */
.void-card-rarity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: 1px solid;
    margin-bottom: 20px;
}

.void-card-rarity.common {
    color: #888888;
    border-color: rgba(136, 136, 136, 0.5);
    background: rgba(136, 136, 136, 0.1);
}

.void-card-rarity.rare {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.1);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.void-card-rarity.epic {
    color: #aa55ff;
    border-color: rgba(170, 85, 255, 0.5);
    background: rgba(170, 85, 255, 0.1);
    text-shadow: 0 0 10px rgba(170, 85, 255, 0.5);
}

.void-card-rarity.legendary {
    color: #ffcc00;
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(255, 204, 0, 0.1);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.void-card-rarity.unique {
    color: #ff3366;
    border-color: rgba(255, 51, 102, 0.5);
    background: rgba(255, 51, 102, 0.1);
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.7);
    animation: unique-glow 2s ease-in-out infinite;
}

@keyframes unique-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 51, 102, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 51, 102, 0.6); }
}

/* Stats Grid */
.void-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.void-card-stat {
    position: relative;
    padding: 14px 16px;
    background: rgba(0, 255, 255, 0.02);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.void-card-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stat-color, rgba(0, 255, 255, 0.5));
}

.void-card-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.void-card-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--stat-color, #00ffff);
    text-shadow: 0 0 10px var(--stat-color, rgba(0, 255, 255, 0.5));
}

.void-card-stat-value.deaths {
    --stat-color: #ff3333;
}

.void-card-stat-value.clears {
    --stat-color: #00ff88;
}

.void-card-stat-value.hash {
    font-size: 18px;
    font-family: 'Courier New', monospace;
    --stat-color: rgba(255, 255, 255, 0.6);
}

/* =================================
   Parameters Section (Attributes/Effects)
   ================================= */
.void-card-params {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    flex-shrink: 0;
}

.void-card-param {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.15);
}

.void-card-param-icon {
    font-size: 14px;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.void-card-param-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.void-card-param-value {
    font-size: 11px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

/* =================================
   SYSTEM_PARAMS Radar Chart
   ================================= */
.void-card-system-params {
    position: relative;
    text-align: center;
    margin-top: 16px;
}

.void-card-system-params-label {
    font-size: 9px;
    color: #333;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

#void-card-stats-radar {
    background: transparent;
}

/* =================================
   Bottom Section
   ================================= */
.void-card-bottom {
    position: absolute;
    bottom: 0;
    left: 420px;
    right: 0;
    height: 100px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

/* Barcode Section */
.void-card-barcode-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.void-card-barcode {
    position: relative;
    width: 180px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: hidden;
}

.void-card-bar {
    position: absolute;
    top: 4px;
    height: 42px;
    background: #00ffff;
    box-shadow: 0 0 4px rgba(0, 255, 255, 0.5);
}

.void-card-barcode-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.void-card-barcode-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.void-card-barcode-id {
    font-size: 20px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    letter-spacing: 1px;
}

.void-card-timestamp {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: right;
    line-height: 1.6;
}

/* =================================
   Decorative Elements
   ================================= */
.void-card-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.void-card-corner.tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.void-card-corner.tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.void-card-corner.bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.void-card-corner.br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

/* Data stream decoration */
.void-card-data-stream {
    position: absolute;
    top: 60px;
    left: 30px;
    font-size: 10px;
    color: rgba(0, 255, 255, 0.2);
    line-height: 1.4;
    font-family: 'Courier New', monospace;
    writing-mode: vertical-rl;
}

/* =================================
   Modal Controls
   ================================= */
.void-card-controls {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: flex;
    gap: 10px;
    z-index: 9001;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    margin-top: auto;
}

.void-card-btn {
    padding: 12px 20px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex: 1 1 auto;
    min-width: 80px;
    text-align: center;
}

.void-card-btn:active {
    transform: scale(0.95);
}

/* スマホ向けボタンサイズ調整 */
@media (max-width: 480px) {
    .void-card-controls {
        gap: 8px;
        padding: 8px;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .void-card-btn {
        padding: 14px 16px;
        font-size: 11px;
        letter-spacing: 0.5px;
        min-width: 80px;
        flex: 1 1 calc(50% - 8px);
    }
    .void-card-close {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 360px) {
    .void-card-controls {
        gap: 6px;
        padding: 6px;
    }
    .void-card-btn {
        padding: 12px 10px;
        font-size: 10px;
        min-width: 70px;
    }
}

.void-card-btn.primary {
    color: #00ffff;
    border-color: #00ffff;
}

.void-card-btn.primary:hover {
    background: #00ffff;
    color: #0a0a0f;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.void-card-btn.secondary {
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.void-card-btn.secondary:hover {
    color: #ffffff;
    border-color: #ffffff;
}

.void-card-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    z-index: 9001;
    transition: all 0.2s ease;
}

.void-card-close:hover {
    color: #ff3333;
    border-color: #ff3333;
}

/* =================================
   Loading Animation
   ================================= */
.void-card-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9500;
}

.void-card-loading.visible {
    display: flex;
}

.void-card-loading-text {
    font-size: 24px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.void-card-loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.void-card-loading-bar::after {
    content: '';
    position: absolute;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: loading-slide 1s ease-in-out infinite;
}

@keyframes loading-slide {
    0% { left: -50%; }
    100% { left: 100%; }
}

.void-card-loading-lines {
    margin-top: 30px;
    font-size: 12px;
    color: rgba(0, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    text-align: left;
    line-height: 1.8;
}

.void-card-loading-line {
    opacity: 0;
    animation: line-appear 0.3s ease forwards;
}

.void-card-loading-line:nth-child(1) { animation-delay: 0.1s; }
.void-card-loading-line:nth-child(2) { animation-delay: 0.3s; }
.void-card-loading-line:nth-child(3) { animation-delay: 0.5s; }
.void-card-loading-line:nth-child(4) { animation-delay: 0.7s; }
.void-card-loading-line:nth-child(5) { animation-delay: 0.9s; }

@keyframes line-appear {
    to { opacity: 1; }
}
