/* Modern, Artistic Base Styles */
@import './common.css';

/* Page-specific styles */
/* Artistic Background Elements */
body{
  height: 100%;
}
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234361ee' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
  opacity: 0.5;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Welcome Screen - Modern Modal Design */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.welcome-screen > div {
  width: 90%;
  max-width: 710px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.welcome-screen h1 {
  background: linear-gradient(90deg, #1150B2 0%, #5694F7 100%);
  color: white;
  margin: 0;
  padding: 1.5rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-screen p {
  font-size: 1rem;
  color: #2c3e50;
  line-height: 1.6;
}

/* Main Content */
.main-content {
  padding: 1.5rem;
  animation: fadeUp 0.8s ease-out forwards;
}

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

/* Modern Card Design */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: #fff;
}

.card-header {
  background: #D9E8FF;
  border-bottom: none;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  background: linear-gradient(98.86deg, #0644A6 0.66%, #5795F8 100%);
  background-clip: border-box;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-body.p-0 {
  padding: 0;
  position: relative;
  overflow: hidden;
}

button#endInterviewBtn {
  width: 149px;
  font-size: 13px;
  padding: 10px 4px;
  border-radius: 6px;
  margin-bottom: 0px !important;
  background: linear-gradient(45deg, #dc3545, #c82333);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

button#endInterviewBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* Stylish Video Container */
#videoContainer {
  position: relative;
  height: 25em;
  /* width: 13em; */
  width: auto;
  margin: 0 auto;
  transition: var(--transition-normal);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#video {
  position: absolute;
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  /* width: fit-content; */
  height: 480px;
  border-radius: 16px;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* width: fit-content; */
  height: 480px;
  pointer-events: none;
  border-radius: 16px;
  z-index: 28;
}

.container1 {
  position: relative;
  width: 100%;
  border-radius: 0 0 15px 15px;
  transition: box-shadow 0.3s ease;
}

.black-shadow { box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
.red-shadow { box-shadow: 0 0 20px rgba(255, 0, 0, 0.7); }
.yellow-shadow { box-shadow: 0 0 20px rgba(255, 255, 0, 0.7); }
.green-shadow { box-shadow: 0 0 20px rgba(0, 255, 0, 0.7); }


/* Modern Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Recording Timer - Inside Audio Wave Container */
#audioWaveContainer {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#audioWaveContainer #recordingTime {
  font-size: 1rem;
  font-weight: normal;
  color: #1150B2;
  margin-left: auto;
  margin-right: 0;
  font-family: 'Courier New', monospace;
  transition: color 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  padding-left: 15px;
}

.control-btn {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: white;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.control-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%) rotate(45deg);
  transition: var(--transition-normal);
  z-index: -1;
}
.mic-warning {
  color: #ff3d00;
  margin-top: 10px;
  display: none;
}

.mic-loading {
  margin-top: 10px;
  color: #2196F3;
}
.show-face-points {
  position: absolute;
  top: 15px;
  z-index: 100;
  background-color: rgba(255,255,255,0.9);
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 150px;
}
.show-face-points:hover {
  background-color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  color:#000;
}

.control-btn:hover::before {
  transform: translateX(100%) rotate(45deg);
}

.control-btn:disabled {
  background: linear-gradient(45deg, #d1d1d1, #c3c3c3);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.control-btn:first-child {
  background: linear-gradient(45deg, var(--success-color), #2ecc71);
}

.control-btn:first-child:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(14, 173, 105, 0.3);
}

.control-btn:last-child {
  background: linear-gradient(45deg, var(--danger-color), #e74c3c);
}

.control-btn:last-child:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
}

.status-text {
  margin: 0 0 0 auto;
  color: var(--dark-color);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* .face-screen {
    display: flex;
    height: 90vh;
    align-items: center;
} */

/* Enhanced Transcript Container */
#transcriptContainer {
  border: none;
  border-radius: 16px;
  padding: 20px;
  margin-top: 25px;
  background-color: rgba(248, 249, 250, 0.8);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) rgba(0, 0, 0, 0.05);
  transition: var(--transition-normal);
}

#transcriptContainer::-webkit-scrollbar {
  width: 8px;
}

#transcriptContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

#transcriptContainer::-webkit-scrollbar-thumb {
  background-color: var(--primary-light);
  border-radius: 10px;
}

#transcript {
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--dark-color);
}

/* Stylish AI Response */
.ai-response-container {
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(to right, rgba(67, 97, 238, 0.05), rgba(76, 201, 240, 0.05));
  border-radius: 16px;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.ai-response-container h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.ai-response-container h4 i {
  color: var(--primary-color);
}

.ai-response {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--dark-color);
  position: relative;
  z-index: 2;
}

.ai-response-container::before {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(76, 201, 240, 0.1) 0%, transparent 70%);
  z-index: 1;
}

/* Enhanced Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.9);
  color: #495057;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.status-connected {
  background-color: #d4edda;
  color: #155724;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
}

/* Artistic Buttons */
.btn-primary {
  background: linear-gradient(90deg, #1150B2 0%, #5694F7 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #5694F7, #1150B2);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  border-radius: 8px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
  color: #fff;
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary i {
  margin-right: 0.25rem;
}

.btn-danger {
  background: linear-gradient(45deg, var(--danger-color), #f64f59);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-normal);
}

.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.btn-danger:hover::before {
  left: 100%;
}

/* Enhanced Animations */
.pulse-btn {
  animation: enhanced-pulse 2.5s infinite;
}

@keyframes enhanced-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(67, 97, 238, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
  }
}

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.7s ease-in forwards;
}

.fade-out {
  animation: fadeOut 0.7s ease-out forwards;
}

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

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

.highlight-animation {
  animation: modern-highlight 1.2s ease;
}

@keyframes modern-highlight {
  0% { background-color: rgba(76, 201, 240, 0.1); }
  50% { background-color: rgba(76, 201, 240, 0.3); }
  100% { background-color: rgba(76, 201, 240, 0.1); }
}

.recording {
  color: #e63946;
  font-weight: bold;
  animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.error-text {
  color: #e63946;
  font-weight: 500;
}

/* Form Group Styling */
.form-group label {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label i {
  color: #1150B2;
}

.form-control,
.form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.5rem;
  transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #1150B2;
  box-shadow: none;
}

/* Microphone Selection Styling */
.mic-selection {
  max-width: 500px;
  width: 100%;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.mic-selection label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
  font-size: 1rem;
}

.mic-selection label i {
  color: #1150B2;
}

.mic-selection select,
.mic-selection .form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.5rem;
  transition: border-color 0.3s ease;
  width: 100%;
}

.mic-selection select:focus,
.mic-selection .form-control:focus {
  border-color: #1150B2;
  box-shadow: none;
}

/* Artistic Warning Effects */
.red-shadow {
  box-shadow: 0 0 100px rgba(230, 57, 70, 0.6);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.red-shadow::before {
  background: linear-gradient(45deg, var(--danger-color), transparent, var(--danger-color), transparent);
}

.black-shadow {
  box-shadow: 0 0 100px 5px rgba(194, 194, 194, 0.7);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yellow-shadow {
  box-shadow: 0 0 40px rgba(255, 193, 7, 0.6);
  border: 2px solid rgba(255, 193, 7, 0.7);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulse-warning {
  animation: artistic-pulse-border 1.5s infinite;
}



.welcome-screen .alert-danger p {
	font-size: 15px !important;
	margin-bottom: 0px;
}


@keyframes artistic-pulse-border {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 15px rgba(230, 57, 70, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  #videoContainer {
    width: 100%;
    /* height: auto; */
  }
  
  #video, #overlay {
    width: 100%;
    /* height: auto; */
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }

  .main-content {
  padding: 0;

}

.welcome-screen {
  height: auto;
}

.card-header h3 {
	font-size: 14px;
	}

  .status-badge {
	font-size: 12px;
}

.show-face-points {
    display: none;
}

#videoContainer {
      height: 21em;
}

.face-screen {
       height: 100vh;
       margin-top:10px;
}

}

@media (max-width: 768px) {
  .welcome-screen h1 {
    font-size: 2.5rem;
  }
  
  .welcome-screen p {
    font-size: 1.1rem;
  }
  
  .card-header h3 {
    font-size: 1.2rem;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .control-btn {
    justify-content: center;
  }
  
  .status-text {
    margin: 10px 0 0 0;
    justify-content: center;
  }

   .card-header h3 {
    font-size: 14px;
  }


}

@media (max-width: 480px) {
  .welcome-screen {
    padding: 2rem;
  }
  
.welcome-screen h1 {
    font-size: 1.4rem;
    font-weight: 600;
  }
  
  .card-header {
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }
  
  .status-badge {
    align-self: flex-start;
  }
div#card-1 {
    height: 409px;
    background: no-repeat;
    box-shadow: none;
}

#overlay {
  position: relative;
}

.welcome-screen {
  height: 100%;
}

#videoContainer {
    width: 100%;
    height: 100%;
    display: flex;
    box-shadow: none;
    margin-top: 17px;
}
#video, #overlay {
  width: 400px;
  height: 400px;
}

.welcome-screen p {
	font-size: 1rem;
}

.mic-warning {
	font-size: 12px;
}

.welcome-screen .alert-danger p {
	font-size: 13px !important;
	margin-bottom: 0px;
}

.metric-value {
  font-size: 1.5rem;

}

button#showFacePointsBtn {
    display: none;
}

}