/* ==================================================
   NATIVE APP STYLE - COMPLETE CATCH DETAIL
   All Original Elements Included
   ================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0A4D68;
    --secondary: #088395;
    --accent: #05BFDB;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --dark: #1A1A1A;
    --gray: #6B7280;
    --light-gray: #F3F4F6;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

/* ==================================================
   CONTAINER
   ================================================== */
.app-detail-container {
    min-height: 100vh;
    background: var(--light-gray);
    padding-bottom: 80px;
}

/* ==================================================
   FIXED HEADER
   ================================================== */
.app-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.header-back,
.header-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--dark);
}

.header-back:active,
.header-action:active {
    transform: scale(0.9);
}

.header-back svg,
.header-action svg {
    width: 20px;
    height: 20px;
    color: var(--dark);
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

/* ==================================================
   HERO GALLERY
   ================================================== */
.hero-gallery {
    position: relative;
    width: 100%;
    height: 50vh;
    max-height: 500px;
    margin-top: 60px;
    background: #000;
}

.gallery-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.gallery-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.hero-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 80px;
    height: 80px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    z-index: 10;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-badge.legendary {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.9))
            drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite,
               legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7))
                drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 35px rgba(255, 215, 0, 1))
                drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    }
}

.hero-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Gallery Controls */
.gallery-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.gallery-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: var(--dark);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gallery-btn:active {
    transform: scale(0.9);
}

.gallery-dots {
    display: flex;
    gap: 6px;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

.gallery-dot.active {
    background: white;
    width: 20px;
    border-radius: 3px;
}

.gallery-counter {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.no-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    background: #1A1A1A;
}

.no-photo-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.4;
    margin-bottom: 12px;
}

/* ==================================================
   CONTENT SECTION
   ================================================== */
.detail-content {
    background: var(--light-gray);
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
    position: relative;
    z-index: 2;
    padding: 20px 16px;
}

/* ==================================================
   CARDS
   ================================================== */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* ==================================================
   PRIMARY CARD
   ================================================== */
.primary-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.catch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.species-badge {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.species-info {
    flex: 1;
}

.catch-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 4px 0;
}

.catch-weight {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    margin: 0;
}

.trophy-pill {
    background: rgba(255,215,0,0.3);
    color: #FFD700;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* User Link */
.user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: all 0.3s;
}

.user-link:active {
    transform: scale(0.98);
    background: rgba(255,255,255,0.15);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-letter {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.user-text {
    flex: 1;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 2px 0;
}

.user-username {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.chevron-right {
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,0.6);
    stroke-width: 2;
}

/* ==================================================
   BADGE CONTAINER
   ================================================== */
.badge-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    max-width: fit-content;
}

/* Badge Styles */
.badge-personal-log {
    background: #fff8e1;
    color: #f57c00;
    border-color: #ffb74d;
}

.badge-trophy-eligible {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border-color: #ff9800;
    font-weight: 800;
}

.badge-pending-verification {
    background: #e1f5fe;
    color: #01579b;
    border-color: #03a9f4;
    animation: pulse-trophy 2s ease-in-out infinite;
}

@keyframes pulse-trophy {
    0%, 100% { box-shadow: 0 0 0 0 rgba(3, 169, 244, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(3, 169, 244, 0); }
}

.badge-verified {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
    border-color: #4caf50;
    font-weight: 800;
}

.badge-verification-rejected {
    background: #ffebee;
    color: #b71c1c;
    border-color: #ef5350;
}

/* ==================================================
   CTA CARD
   ================================================== */
.cta-card {
    background: linear-gradient(135deg, var(--success), #20c997);
    color: white;
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cta-icon {
    font-size: 48px;
}

.cta-text h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.cta-text p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.cta-button {
    width: 100%;
    padding: 14px;
    background: white;
    color: var(--success);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button:active {
    transform: scale(0.98);
}

/* ==================================================
   ALERT CARDS
   ================================================== */
.alert-danger {
    background: #ffebee;
    border-left: 4px solid var(--danger);
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.alert-title svg {
    width: 20px;
    height: 20px;
}

.alert-text {
    color: #c62828;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ==================================================
   STATS CARD
   ================================================== */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
    margin: 0 0 4px 0;
}

.stat-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    word-break: break-word;
}

.verified {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 8px;
    background: #D4EDDA;
    color: #155724;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.manual-entry {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 8px;
    background: #FFF3CD;
    color: #856404;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==================================================
   STORY & INFO
   ================================================== */
.story-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--gray);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    text-align: right;
    word-break: break-word;
}

/* ==================================================
   VERIFICATION CARDS
   ================================================== */
.verification-card {
    border-left: 4px solid;
}

.verification-card.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #4caf50;
}

.verification-card.success .card-title {
    color: #1b5e20;
}

.verification-card.partial {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-left-color: #03a9f4;
}

.verification-card.partial .card-title {
    color: #01579b;
}

.verification-card.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    border-left-color: #ffc107;
}

.verification-card.warning .card-title {
    color: #f57c00;
}

.verification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.verification-list li {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.verification-list .trophy-eligible {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(76, 175, 80, 0.3);
    color: #1b5e20;
    font-weight: 600;
}

.verification-list .personal-log {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(3, 169, 244, 0.3);
}

.verification-list .personal-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 193, 7, 0.3);
}

.verification-list .requirements-needed {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 152, 0, 0.3);
    color: #e65100;
}

.requirements-list {
    margin-left: 20px;
    margin-top: 8px;
    list-style: disc;
}

.requirements-list li {
    padding: 4px 0;
}

/* ==================================================
   READINESS CARD
   ================================================== */
.readiness-card {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
}

.readiness-card .card-title {
    color: #856404;
}

.readiness-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.readiness-list li {
    padding: 8px 0;
    color: #856404;
    font-size: 14px;
}

/* ==================================================
   METADATA
   ================================================== */
.metadata-card {
    background: var(--light-gray);
    border: 1px solid var(--border);
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--gray);
}

.metadata-item svg {
    width: 16px;
    height: 16px;
}

.metadata-item.verified {
    color: var(--success);
}

/* ==================================================
   OWNER ACTIONS
   ================================================== */
.owner-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    background: #ffebee;
    color: var(--danger);
}

.btn-danger:active {
    transform: scale(0.98);
    background: #ffcdd2;
}

.btn-danger svg {
    width: 20px;
    height: 20px;
}

/* ==================================================
   BOTTOM SHEET
   ================================================== */
.bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-sheet.active {
    opacity: 1;
    visibility: visible;
}

.sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.sheet-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.bottom-sheet.active .sheet-container {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 24px;
    text-align: center;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--light-gray);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:active {
    transform: scale(0.95);
    background: #e9ecef;
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon.fb {
    background: #1877F2;
}

.share-icon.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-icon.tt {
    background: #000;
}

.share-icon.copy {
    background: var(--primary);
}

.share-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.share-btn span {
    font-size: 11px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
}

/* ==================================================
   RESPONSIVE - DESKTOP
   ================================================== */
@media (min-width: 768px) {
    .app-detail-container {
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
        background: var(--white);
    }
    
    .app-header-fixed {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-gallery {
        max-height: 600px;
    }
    
    .detail-content {
        padding: 24px;
    }
    
    .catch-title {
        font-size: 26px;
    }
    
    .share-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-btn:hover {
        background: white;
        transform: scale(1.1);
    }
}

/* ==================================================
   MOBILE OPTIMIZATION
   ================================================== */
@media (max-width: 640px) {
    .share-btn span {
        font-size: 10px;
    }
    
    .share-grid {
        gap: 12px;
    }
}

/* ==================================================
   CERTIFICATE DOWNLOAD SECTION
   ================================================== */
.certificate-card {
    background: linear-gradient(135deg, #1a3a52 0%, #2d5a7b 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    border: 2px solid #D4AF37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.certificate-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.certificate-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.certificate-info {
    flex: 1;
}

.certificate-title {
    font-size: 20px;
    font-weight: 700;
    color: #D4AF37;
    margin: 0 0 4px 0;
}

.certificate-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Download Button (VIP) */
.certificate-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    color: #1a3a52;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.certificate-download-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.certificate-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
}

.certificate-download-btn:active {
    transform: translateY(0);
}

.certificate-vip-badge {
    text-align: center;
    color: #D4AF37;
    font-size: 12px;
    margin: 12px 0 0 0;
    font-weight: 600;
}

/* Upgrade Button (FREE Users) */
.certificate-upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: 2px dashed rgba(212, 175, 55, 0.5);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.certificate-upgrade-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.certificate-upgrade-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    transform: translateY(-2px);
}

.certificate-vip-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 12px 0 0 0;
    font-style: italic;
}

/* Mobile Optimization */
@media (max-width: 640px) {
    .certificate-card {
        padding: 20px;
    }
    
    .certificate-icon {
        font-size: 40px;
    }
    
    .certificate-title {
        font-size: 18px;
    }
    
    .certificate-description {
        font-size: 13px;
    }
    
    .certificate-download-btn,
    .certificate-upgrade-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}
