/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #1a1a1a;
    color: #00ff00;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, #222 25%, transparent 25%),
        linear-gradient(-45deg, #222 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #222 75%),
        linear-gradient(-45deg, transparent 75%, #222 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* Main Title */
.main-title {
    text-align: center;
    font-size: clamp(1.5rem, 8vw, 4rem);
    margin-top: 1rem;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px #00ff00;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100vw;
}

@media (max-width: 600px) {
    .main-title {
        max-width: 90vw;
        font-size: clamp(1.2rem, 8vw, 2.5rem);
        white-space: normal;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 2rem;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.progress-container:hover {
    transform: scale(1.02);
}

.progress-text {
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
}

.progress-bar {
    width: 100%;
    max-width: 600px;
    min-width: 220px;
    height: 45px;
    background: #000;
    border: 2px solid #00ff00;
    padding: 3px;
    margin-bottom: 1rem;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.progress-container:hover .progress-bar {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.progress {
    width: 75%;
    height: 100%;
    background: #00ff00;
    animation: progress-animation 2s ease-out;
    box-shadow: 0 0 15px #00ff00;
    position: relative;
}

/* Scattered Icons */
.scattered-icons {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 60vh;
    margin-top: 2rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4rem;
}

.icon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2%;
    margin: 0;
    width: 100%;
}

.icon {
    position: relative;
    width: 180px;
    height: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}

.icon:hover {
    transform: scale(1.1);
}

.icon img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    transition: all 0.3s ease;
}

.icon:hover img {
    filter: drop-shadow(0 0 15px #00ff00);
}

/* Terminal Contact Form */
.terminal {
    display: none; /* Initially hide the contact form */
    background: #000;
    border: 2px solid #00ff00;
    width: 100%;
    max-width: 600px;
    margin: 4rem auto;
    transition: display 1s;
}

.show-contact-form {
    display: block; /* Triggered when user scrolls */
}

.terminal-header {
    background: #00ff00;
    color: #000;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 15px;
    height: 15px;
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.terminal-body {
    padding: 2rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 0.5rem;
    background: #000;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'Press Start 2P', cursive;
}

textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: transform 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #000;
    border: 2px solid #00ff00;
    max-width: 600px;
    width: 90%;
    margin: 10vh auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.modal-title {
    color: #00ff00;
    margin: 0 0 2rem 0;
    padding-right: 2rem;
    font-size: 1.5rem;
    text-shadow: 0 0 5px #00ff00;
}

.modal-text {
    color: #00ff00;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 60vh;
    overflow-y: auto;
}

/* Scrollbar styling for modal text */
.modal-text::-webkit-scrollbar {
    width: 8px;
}

.modal-text::-webkit-scrollbar-track {
    background: #000;
    border: 1px solid #00ff00;
}

.modal-text::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

/* Modal animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Typing cursor animation */
.typing::after {
    content: '|';
    animation: blink 1s infinite;
}

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

/* Animations */
@keyframes progress-animation {
    from { width: 0; }
    to { width: 75%; }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .icon {
        width: 150px;
        height: 150px;
    }
    .icon-row {
        padding: 0 1%;
    }
}

@media (max-width: 768px) {
    .scattered-icons {
        gap: 2rem;
    }
    .icon-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    .icon {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .scattered-icons {
        gap: 1.5rem;
    }
    .icon-row {
        gap: 1rem;
    }
    .icon {
        width: 90px;
        height: 90px;
    }
    .progress-container {
        max-width: 98vw;
        min-width: 0;
    }
    .progress-bar {
        height: 32px;
    }
    .progress-text {
        font-size: 1rem;
    }
}

/* Notification styles */
.notification {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    animation: slideIn 0.5s ease-out;
}

.notification-content {
    background: #000;
    border: 2px solid #00ff00;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.notification-icon {
    color: #00ff00;
    font-size: 24px;
    text-shadow: 0 0 10px #00ff00;
}

.notification-message {
    color: #00ff00;
    font-size: 1rem;
    text-shadow: 0 0 5px #00ff00;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    color: #00ff00;
    cursor: pointer;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00ff00;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }
  .main-title {
    white-space: normal;
    max-width: 95vw;
    font-size: clamp(1.2rem, 6vw, 2.5rem);
    text-align: center;
    overflow-wrap: break-word;
    margin-left: auto;
    margin-right: auto;
  }
  .hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .progress-container {
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 600px;
  }
  .scattered-icons {
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    width: 100%;
  }
  .icon-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  .terminal {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
  }
}
