/* ============================================
   CHI SONO - Terminale Chat Style
   File: page-chi-sono.php
   ============================================ */

/* Container principale - Finestra Terminale */
.terminal-container {
  background-color: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 800px;
  margin: 2rem auto;
  font-family: 'Consolas', 'Fira Code', 'Monaco', monospace;
}

/* Title Bar - Windows Style */
.terminal-titlebar {
  background: linear-gradient(180deg, #3c3c3c 0%, #2d2d2d 100%);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e1e1e;
}

.terminal-titlebar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-icon {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #00FF00 0%, #00DD00 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000000;
  font-weight: bold;
}

.terminal-title {
  color: #cccccc;
  font-size: 13px;
  font-weight: 500;
}

.terminal-controls {
  display: flex;
  gap: 8px;
}

.terminal-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.terminal-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.terminal-btn:hover::before {
  opacity: 1;
}

.terminal-btn-close { 
  background-color: #ff5f57; 
}
.terminal-btn-close::before {
  content: '×';
  color: #820005;
  font-size: 14px;
  line-height: 1;
}

.terminal-btn-minimize { 
  background-color: #febc2e; 
}
.terminal-btn-minimize::before {
  content: '−';
  color: #9a6d03;
  font-size: 14px;
  font-weight: bold;
}

.terminal-btn-maximize { 
  background-color: #28c840; 
}
.terminal-btn-maximize::before {
  content: '□';
  color: #0d6f20;
  font-size: 10px;
}

/* Terminal Content */
.terminal-content {
  padding: 20px 24px;
  min-height: 400px;
  color: #d4d4d4;
  font-size: 15px;
  line-height: 1.7;
}

/* Messaggi del terminale */
.terminal-message {
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInMessage 0.5s ease forwards;
}

.terminal-message::before {
  content: '> ';
  color: #569cd6;
  font-weight: bold;
}

/* Colori per不同 parti del testo */
.terminal-highlight {
  color: #9cdcfe;
}

.terminal-accent {
  color: #ce9178;
}

/* Bottone Download CV */
.terminal-download {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 28px;
  background: linear-gradient(90deg, #00FF00 0%, #00DD00 100%);
  color: #000000 !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.terminal-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
  color: #000000 !important;
}

/* Cursor blink */
.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background-color: #569cd6;
  animation: cursorBlink 1s infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes fadeInMessage {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typing effect - cursor inline */
.typing-container {
  display: inline;
}

.typing-text {
  display: inline;
}

/* Responsive */
@media (max-width: 768px) {
  .terminal-container {
    margin: 1rem;
    border-radius: 8px;
  }
  
  .terminal-content {
    padding: 16px;
    font-size: 14px;
  }
  
  .terminal-title {
    font-size: 12px;
  }
}

/* Per evitare layout shift durante il typing */
.terminal-message.typing {
  min-height: 1.7em;
}

/* Effetto typing - nasconde il testo finché non viene "digitato" */
.typing-text {
  white-space: pre-wrap;
}

/* Testo nascosto durante typing */
.typing-hidden {
  visibility: hidden;
}

/* Container per il bottone - appare dopo il typing */
.terminal-button-container {
  opacity: 0;
  animation: fadeInMessage 0.5s ease forwards;
  animation-delay: 0.5s;
}
