/* Portfolio Management Phase Styles - Phase 11 Implementation */

/* Legacy full-screen transition (deprecated) */
#portfolio-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Phase 11: New popup-based portfolio transition */
.portfolio-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.portfolio-transition-popup {
  background: #18181b;
  border: 3px solid #00ffea;
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  font-family: 'VT323', monospace;
  box-shadow: 0 0 30px #00ffea44;
  animation: portfolioPopupSlideIn 0.5s ease-out;
}

@keyframes portfolioPopupSlideIn {
  0% {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.portfolio-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 255, 234, 0.05);
  border: 1px solid rgba(0, 255, 234, 0.2);
  border-radius: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 255, 234, 0.1);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: #aaa;
}

.stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: #00ffea;
  text-shadow: 0 0 8px #00ffea;
}

.begin-portfolio-btn {
  background: linear-gradient(45deg, #00ffea, #44ff44);
  border: none;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  cursor: pointer;
}

.begin-portfolio-btn:hover {
  background: linear-gradient(45deg, #44ff44, #00ffea);
  box-shadow: 0 0 20px #00ffea;
  transform: scale(1.05);
}

.portfolio-transition-content {
  text-align: center;
  padding: 2rem;
  background: rgba(0, 255, 234, 0.1);
  border: 2px solid #00ffea;
  border-radius: 10px;
  box-shadow: 0 0 30px #00ffea44;
}

.portfolio-transition-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 2rem;
  color: #00ffea;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px #00ffea;
}

.portfolio-transition-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 2rem;
}

.portfolio-transition-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
}

.portfolio-continue-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  background: #00ffea;
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-continue-btn:hover {
  background: #44ff44;
  box-shadow: 0 0 20px #44ff44;
}

/* Portfolio Event Popup Styles */
.portfolio-event-overlay {
  background: rgba(0, 0, 0, 0.9);
}

.portfolio-event-popup {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 3px solid #00ffea;
  border-radius: 10px;
  padding: 2rem;
  position: relative;
}

.portfolio-event-title {
  font-size: 1.4rem;
  color: #00ffea;
  margin-bottom: 1rem;
  text-align: center;
}

.portfolio-event-company {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: #44ff44;
  text-align: center;
  margin-bottom: 1.5rem;
}

.portfolio-event-description {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 2rem;
  text-align: center;
}

.portfolio-event-impact {
  background: rgba(0, 255, 234, 0.1);
  border: 1px solid #00ffea;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.impact-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.impact-row:last-child {
  margin-bottom: 0;
}

.portfolio-event-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.portfolio-action-btn {
  padding: 0.8rem 1.5rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  background: #23232b;
  color: #fff;
  border: 2px solid #00ffea;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.portfolio-action-btn:hover {
  background: #00ffea;
  color: #000;
  box-shadow: 0 0 15px #00ffea;
}

.portfolio-action-btn.pass-btn {
  border-color: #ff4444;
  color: #ff4444;
}

.portfolio-action-btn.pass-btn:hover {
  background: #ff4444;
  color: #000;
  box-shadow: 0 0 15px #ff4444;
}

.portfolio-action-btn.maintain-btn {
  border-color: #ffaa00;
  color: #ffaa00;
}

.portfolio-action-btn.maintain-btn:hover {
  background: #ffaa00;
  color: #000;
  box-shadow: 0 0 15px #ffaa00;
}

.portfolio-action-btn.double-btn {
  border-color: #44ff44;
  color: #44ff44;
}

.portfolio-action-btn.double-btn:hover {
  background: #44ff44;
  color: #000;
  box-shadow: 0 0 15px #44ff44;
}

.portfolio-result-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #00ffea;
  border-radius: 10px;
  padding: 2rem;
  z-index: 1001;
  max-width: 400px;
  width: 90%;
}

.result-content {
  text-align: center;
}

.result-content h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: #00ffea;
  margin-bottom: 1rem;
}

.result-content p {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .portfolio-transition-title {
    font-size: 1.4rem;
  }
  
  /* Phase 11: Mobile adjustments for new popup transition */
  .portfolio-transition-popup {
    width: 95vw;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .portfolio-stats-grid {
    margin: 1rem 0;
    padding: 0.8rem;
  }
  
  .stat-label,
  .stat-value {
    font-size: 0.9rem;
  }
  
  .begin-portfolio-btn {
    font-size: 0.8rem;
    padding: 0.8rem;
  }
  
  .portfolio-event-popup {
    width: 95%;
    padding: 1.5rem;
  }
  
  .portfolio-event-buttons {
    flex-direction: column;
  }
  
  .portfolio-action-btn {
    width: 100%;
    padding: 1rem;
  }
}

/* ==============================================================================
   PHASE 12: FOLLOW-ON INVESTMENT UI STYLES
   ============================================================================== */

/* Follow-on event popup overlay */
.followon-event-overlay {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(2px);
}

/* Main follow-on popup container */
.followon-event-popup {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 3px solid #44ff44;
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  font-family: 'VT323', monospace;
  box-shadow: 0 0 30px #44ff4466;
  animation: followOnSlideIn 0.6s ease-out;
}

@keyframes followOnSlideIn {
  0% {
    transform: scale(0.9) translateY(-30px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Follow-on popup header */
.followon-title {
  font-size: 1.3rem;
  color: #44ff44;
  margin-bottom: 1rem;
  text-align: center;
  text-shadow: 0 0 10px #44ff44;
}

.followon-company-info {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(68, 255, 68, 0.1);
  border: 1px solid rgba(68, 255, 68, 0.3);
  border-radius: 8px;
}

.company-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.funding-stage {
  font-size: 1.1rem;
  color: #44ff44;
  text-shadow: 0 0 8px #44ff44;
}

/* Follow-on description */
.followon-description {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid #00ffea;
}

/* Follow-on details sections */
.followon-details {
  margin-bottom: 2rem;
}

.detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 255, 234, 0.05);
  border: 1px solid rgba(0, 255, 234, 0.2);
  border-radius: 8px;
}

.detail-section h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: #00ffea;
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-shadow: 0 0 8px #00ffea;
}

.detail-grid,
.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.detail-item,
.option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid #44ff44;
}

.detail-label,
.option-label {
  font-size: 0.9rem;
  color: #aaa;
  flex: 1;
}

.detail-value,
.option-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: #fff;
  text-align: right;
  flex: 0 0 auto;
}

.option-desc {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.2rem;
  text-align: right;
}

/* Competition section styling */
.competition-section {
  border-color: #ffaa00;
  background: rgba(255, 170, 0, 0.05);
}

.competition-section h4 {
  color: #ffaa00;
  text-shadow: 0 0 8px #ffaa00;
}

.competition-info {
  font-size: 0.9rem;
  line-height: 1.4;
}

.lead-vc {
  font-weight: bold;
  color: #ffaa00;
  margin-bottom: 0.3rem;
}

.rival-vcs {
  color: #ccc;
  margin-bottom: 0.3rem;
}

.competition-level {
  color: #ff6666;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.player-advantage {
  color: #44ff44;
  font-weight: bold;
  text-shadow: 0 0 4px #44ff44;
}

/* Follow-on action buttons */
.followon-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.followon-btn {
  padding: 1rem 0.8rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  background: #23232b;
  color: #fff;
  border: 2px solid #00ffea;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.2;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.followon-btn:hover {
  background: #00ffea;
  color: #000;
  box-shadow: 0 0 20px #00ffea;
  transform: translateY(-2px);
}

.followon-btn.pass-btn {
  border-color: #ff4444;
  color: #ff4444;
}

.followon-btn.pass-btn:hover {
  background: #ff4444;
  color: #000;
  box-shadow: 0 0 20px #ff4444;
}

.followon-btn.prorata-btn {
  border-color: #44ff44;
  color: #44ff44;
}

.followon-btn.prorata-btn:hover {
  background: #44ff44;
  color: #000;
  box-shadow: 0 0 20px #44ff44;
}

.followon-btn.double-btn {
  border-color: #ffaa00;
  color: #ffaa00;
}

.followon-btn.double-btn:hover {
  background: #ffaa00;
  color: #000;
  box-shadow: 0 0 20px #ffaa00;
}

.btn-subtitle {
  font-size: 0.6rem;
  margin-top: 0.3rem;
  opacity: 0.8;
  font-weight: normal;
}

/* Follow-on result popup */
.followon-result-overlay {
  background: rgba(0, 0, 0, 0.9);
}

.followon-result-popup {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 3px solid #00ffea;
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  font-family: 'VT323', monospace;
  box-shadow: 0 0 30px #00ffea66;
  animation: resultPopupBounce 0.8s ease-out;
}

@keyframes resultPopupBounce {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.result-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
}

.result-header.success {
  background: rgba(68, 255, 68, 0.2);
  border: 1px solid rgba(68, 255, 68, 0.5);
}

.result-header.failure {
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid rgba(255, 68, 68, 0.5);
}

.result-header.neutral {
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid rgba(255, 170, 0, 0.5);
}

.result-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.result-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  margin: 0;
}

.result-content {
  margin-bottom: 2rem;
}

.result-message {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
}

.result-details {
  background: rgba(0, 255, 234, 0.05);
  border: 1px solid rgba(0, 255, 234, 0.2);
  border-radius: 8px;
  padding: 1rem;
}

.result-details .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-details .detail-row:last-child {
  border-bottom: none;
}

.result-details .detail-label {
  font-size: 0.9rem;
  color: #aaa;
}

.result-details .detail-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: #fff;
}

.result-details .detail-value.positive {
  color: #44ff44;
  text-shadow: 0 0 4px #44ff44;
}

.result-details .detail-value.negative {
  color: #ff4444;
  text-shadow: 0 0 4px #ff4444;
}

.result-actions {
  text-align: center;
}

.followon-result-btn {
  padding: 1rem 2rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  background: #00ffea;
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.followon-result-btn:hover {
  background: #44ff44;
  box-shadow: 0 0 20px #44ff44;
  transform: scale(1.05);
}

/* Mobile responsive adjustments for follow-on UI */
@media (max-width: 768px) {
  .followon-event-popup {
    width: 95vw;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .followon-actions {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .followon-btn {
    padding: 1rem;
    min-height: 70px;
    font-size: 0.6rem;
  }
  
  .detail-grid,
  .option-grid {
    gap: 0.6rem;
  }
  
  .detail-item,
  .option-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem;
  }
  
  .detail-value,
  .option-value {
    margin-top: 0.3rem;
    text-align: left;
  }
  
  .followon-result-popup {
    width: 95vw;
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* ==============================================================================
   PHASE 12.5: INVESTMENT PHASE FOLLOW-ON UI STYLES
   ============================================================================== */

/* Investment phase follow-on overlay (higher z-index than regular popups) */
.investment-phase-followon {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(3px);
}

/* Investment phase follow-on popup styling */
.investment-phase-popup {
  border-color: #ffaa00;
  box-shadow: 0 0 40px #ffaa0066;
  animation: investmentPhaseSlideIn 0.7s ease-out;
}

@keyframes investmentPhaseSlideIn {
  0% {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Investment phase specific title styling */
.investment-phase-popup .followon-title {
  color: #ffaa00;
  text-shadow: 0 0 12px #ffaa00;
  border-bottom: 2px solid #ffaa00;
  padding-bottom: 0.5rem;
}

/* Investment phase company info styling */
.investment-phase-popup .followon-company-info {
  background: rgba(255, 170, 0, 0.15);
  border-color: rgba(255, 170, 0, 0.4);
}

.investment-phase-popup .funding-stage {
  color: #ffaa00;
  text-shadow: 0 0 10px #ffaa00;
}

/* Investment phase description alert styling */
.investment-phase-popup .followon-description {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.1) 0%, rgba(255, 68, 68, 0.1) 100%);
  border-left-color: #ffaa00;
  border-left-width: 5px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(255, 170, 0, 0.3);
}

/* Investment phase button styling - more urgent colors */
.investment-phase-popup .followon-btn {
  border-width: 3px;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.investment-phase-popup .followon-btn.pass-btn {
  border-color: #ff6666;
  color: #ff6666;
  background: rgba(255, 102, 102, 0.1);
}

.investment-phase-popup .followon-btn.pass-btn:hover {
  background: #ff6666;
  color: #000;
  box-shadow: 0 0 25px #ff6666;
  transform: translateY(-3px);
}

.investment-phase-popup .followon-btn.prorata-btn {
  border-color: #66ff66;
  color: #66ff66;
  background: rgba(102, 255, 102, 0.1);
}

.investment-phase-popup .followon-btn.prorata-btn:hover {
  background: #66ff66;
  color: #000;
  box-shadow: 0 0 25px #66ff66;
  transform: translateY(-3px);
}

.investment-phase-popup .followon-btn.double-btn {
  border-color: #ffcc00;
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.1);
}

.investment-phase-popup .followon-btn.double-btn:hover {
  background: #ffcc00;
  color: #000;
  box-shadow: 0 0 25px #ffcc00;
  transform: translateY(-3px);
}

/* Investment phase result popup enhanced styling */
.investment-phase-followon + .followon-result-overlay .followon-result-popup {
  border-color: #ffaa00;
  box-shadow: 0 0 35px #ffaa0066;
}

.investment-phase-followon + .followon-result-overlay .result-header.success {
  background: rgba(102, 255, 102, 0.25);
  border-color: rgba(102, 255, 102, 0.6);
}

.investment-phase-followon + .followon-result-overlay .result-header.failure {
  background: rgba(255, 102, 102, 0.25);
  border-color: rgba(255, 102, 102, 0.6);
}

.investment-phase-followon + .followon-result-overlay .result-header.neutral {
  background: rgba(255, 170, 0, 0.25);
  border-color: rgba(255, 170, 0, 0.6);
}

/* Investment phase mobile adjustments */
@media (max-width: 768px) {
  .investment-phase-popup {
    width: 98vw;
    margin: 0.5rem;
  }
  
  .investment-phase-popup .followon-title {
    font-size: 1rem;
  }
  
  .investment-phase-popup .followon-description {
    font-size: 0.95rem;
    padding: 0.8rem;
  }
}