:root {
    --terminal-bg: #1a1b26;
    --terminal-text: #a9b1d6;
    --terminal-green: #9ece6a;
    --terminal-blue: #7aa2f7;
    --terminal-purple: #bb9af7;
    --terminal-red: #f7768e;
    --terminal-yellow: #e0af68;
    --terminal-input-bg: #24283b;
    --terminal-border: #414868;
    --terminal-accent: #73daca;
    --terminal-header: #16161e;
    --terminal-success: #73daca;
    --terminal-warning: #ff9e64;
    --box-shadow-color: rgba(0, 0, 0, 0.5);
    --repo-date-color: #8a94c2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Mono', monospace;
}

body {
    background-color: var(--terminal-bg);
    color: var(--terminal-text);
    min-height: 100vh;
    display: flex; 
    justify-content: center;
    align-items: center;
    padding: clamp(5px, 1vw, 10px);
    background: radial-gradient(circle at center, #202334, #121420);
}

.terminal-container {
    width: calc(100% - clamp(10px, 2vw, 20px));
    height: calc(100vh - clamp(10px, 2vw, 20px));
    background-color: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--box-shadow-color);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.terminal-container:hover {
    box-shadow: 0 20px 40px var(--box-shadow-color);
    transform: translateY(-5px);
}

.terminal-header {
    background-color: var(--terminal-header);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--terminal-border);
    position: relative;
    justify-content: center;
}

.terminal-title {
    color: var(--terminal-text);
    font-size: clamp(14px, 2.2vw, 18px);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

.terminal-content {
    padding: clamp(15px, 4vw, 25px);
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 108px);
}

.fixed-content {
    flex-shrink: 0;
}

.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px;
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: var(--terminal-input-bg);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background-color: var(--terminal-border);
    border-radius: 3px;
}

.terminal-section {
    margin: 0 0 clamp(15px, 3vh, 25px) 0;
    animation: fadeIn 0.5s ease forwards;
}

.terminal-intro {
    font-size: clamp(13px, 1.8vw, 16px);
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--terminal-text);
    text-align: center;
}

.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.user-avatar {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--terminal-border);
    font-size: clamp(14px, 1.5vw, 16px);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon {
    position: relative;
}

.profile-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.subscription-input {
    width: 100%;
    background-color: var(--terminal-input-bg);
    border: 2px solid var(--terminal-border);
    border-radius: 6px;
    color: var(--terminal-text);
    padding: 14px 12px 14px 38px;
    font-size: clamp(13px, 1.8vw, 16px);
    cursor: text;
    transition: all 0.3s ease;
}

.subscription-input:focus {
    outline: none;
    border-color: var(--terminal-purple);
    box-shadow: 0 0 0 2px rgba(187, 154, 247, 0.3);
}

.subscription-input::placeholder {
    color: var(--terminal-border);
    opacity: 0.8;
}

.button-icon {
    margin-right: 8px;
    font-size: clamp(12px, 1.5vw, 14px);
}

.glow-button {
    background: linear-gradient(75deg, var(--terminal-input-bg), var(--terminal-border));
    color: var(--terminal-text);
    border: none;
    padding: clamp(10px, 2vw, 14px) clamp(15px, 3vw, 25px);
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(12px, 1.8vw, 15px);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.glow-button.primary {
    background: linear-gradient(45deg, var(--terminal-purple), var(--terminal-blue));
    color: #ffffff;
    font-weight: 600;
}

.glow-button.download-all {
    background: linear-gradient(45deg, var(--terminal-green), var(--terminal-accent));
    color: #ffffff;
    font-weight: 600;
}

.glow-button.success {
    background: linear-gradient(45deg, var(--terminal-green), var(--terminal-accent));
    color: #ffffff;
    font-weight: 600;
}

.glow-button.warning {
    background: linear-gradient(45deg, var(--terminal-yellow), var(--terminal-warning));
    color: #ffffff;
    font-weight: 600;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(122, 162, 247, 0.4);
    filter: brightness(1.1);
}

.glow-button.download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 218, 202, 0.4);
    filter: brightness(1.1);
}

.glow-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(122, 162, 247, 0.4);
}

.glow-button.download-all:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(115, 218, 202, 0.4);
}

.glow-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.7s ease;
}

.glow-button:hover::before {
    left: 100%;
}

.terminal-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vw, 15px);
    margin: clamp(10px, 2vh, 20px) 0;
    justify-content: center;
    align-items: center;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vw, 15px);
    width: 100%;
}

.input-section {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2vh, 15px);
    background-color: var(--terminal-input-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--terminal-border);
}

.repo-header h3 {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--terminal-accent);
    margin: 0;
}

.repo-count {
    font-size: clamp(13px, 1.8vw, 16px);
    background-color: var(--terminal-bg);
    color: var(--terminal-green);
    padding: 5px 10px;
    border-radius: 12px;
    border: 1px solid var(--terminal-border);
}

.search-container {
    margin-bottom: 20px;
}

.repo-list-container {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(10px, 2vh, 15px);
}

.repo-item {
    padding: clamp(10px, 1.5vh, 15px);
    background-color: var(--terminal-input-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--terminal-border);
    transition: all 0.3s ease;
}

.repo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--terminal-purple);
}

.repo-name-container {
    font-size: clamp(13px, 1.8vw, 16px);
    padding: 10px;
    border-radius: 6px;
    background-color: var(--terminal-bg);
    color: var(--terminal-blue);
    border: 1px solid var(--terminal-border);
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: unset;
    width: 250px;
    scrollbar-width: thin;
    scrollbar-color: var(--terminal-border) var(--terminal-bg);
    margin-bottom: 8px;
}

.repo-description {
    font-size: clamp(12px, 1.6vw, 14px);
    padding: 8px 10px;
    color: var(--terminal-text);
    background-color: rgba(26, 27, 38, 0.5);
    border-radius: 6px;
    max-height: 60px;
    overflow-y: auto;
    white-space: normal;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.repo-name-container::-webkit-scrollbar,
.repo-description::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}

.repo-name-container::-webkit-scrollbar-track,
.repo-description::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

.repo-name-container::-webkit-scrollbar-thumb,
.repo-description::-webkit-scrollbar-thumb {
    background-color: var(--terminal-border);
    border-radius: 4px;
}

.repo-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.repo-dates-langs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.repo-language {
    font-size: clamp(10px, 1.4vw, 12px);
    color: var(--terminal-green);
}

.repo-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.repo-date {
    font-size: clamp(10px, 1.4vw, 12px);
    color: var(--repo-date-color);
}

.repo-stats {
    display: flex;
    gap: 15px;
    font-size: clamp(10px, 1.4vw, 12px);
    color: var(--terminal-text);
    align-items: center;
}

a.glow-button.secondary {
    background: linear-gradient(45deg, var(--terminal-input-bg), #2a2e3d);
    color: var(--terminal-text);
    text-decoration: none;
    padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 18px);
    font-size: clamp(11px, 1.6vw, 14px);
    min-width: auto;
    flex-shrink: 0;
    width: auto;
    margin-bottom: 0;
}

a.glow-button.secondary:hover {
    background: linear-gradient(45deg, #2a2e3d, var(--terminal-input-bg));
    color: var(--terminal-accent);
}

.terminal-error {
    color: var(--terminal-red);
    font-size: clamp(13px, 1.8vw, 16px);
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(247, 118, 142, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--terminal-red);
}

.terminal-footer {
    padding: clamp(10px, 2vh, 15px);
    text-align: center;
    background-color: var(--terminal-header);
    border-top: 1px solid var(--terminal-border);
    position: relative;
}

.terminal-footer a {
    color: var(--terminal-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terminal-footer a:hover {
    color: var(--terminal-accent);
    text-decoration: underline;
}

.typing-animation {
    display: inline-block;
    position: relative;
}

.typing-animation::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 15px;
    background-color: var(--terminal-blue);
    animation: blink 1s infinite;
}

h3 {
    margin-bottom: clamp(10px, 2vh, 15px);
    color: var(--terminal-text);
    font-size: clamp(14px, 2vw, 18px);
}

.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vh, 40px);
}

.terminal-loader {
    width: 100%;
    height: 4px;
    background-color: var(--terminal-input-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

.terminal-loader-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--terminal-purple), var(--terminal-blue));
    border-radius: 4px;
    position: absolute;
    animation: loading 1.5s infinite ease-in-out;
}

.loading-text {
    color: var(--terminal-blue);
    font-size: clamp(13px, 1.8vw, 16px);
    letter-spacing: 1px;
    animation: pulse 1.5s infinite;
}

@keyframes loading {
    0% { left: -30%; }
    50% { left: 100%; }
    100% { left: -30%; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

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

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

@media (min-width: 768px) {
    .repo-list-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .repo-item {
        flex-direction: column;
    }
    
    .repo-info {
        flex-direction: row;
        align-items: center;
    }
    
    .repo-dates-langs {
        flex: 1;
    }
    
    .repo-actions {
        margin-top: 0;
    }
}

@media (min-width: 1024px) {
    .repo-list-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .repo-item {
        flex-direction: row;
        align-items: center;
    }
    
    .repo-info {
        flex: 1;
    }
    
    .button-group {
        flex-direction: row;
    }
    
    .button-group button {
        margin-bottom: 0;
    }
}