@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

body {
    font-family: 'Roboto Mono', monospace;
    background-color: #1a1a1a;
    color: #0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0.5rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.container {
    background-color: rgba(0, 0, 0, 0.85);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border: 1px solid #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    width: 100%;
    max-width: 600px;
    text-align: center;
    backdrop-filter: blur(5px);
    position: relative;
}

.thank-you-tab {
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #0f0, #00cc00);
    color: #000;
    padding: 0.6rem 1rem;
    border-radius: 0 0 10px 10px;
    font-family: 'Roboto Mono', monospace;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #0f0;
    text-align: center;
    white-space: nowrap;
}

.thank-you-tab:hover {
    background: linear-gradient(45deg, #00ff00, #0f0);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.9);
    transform: translateX(-50%) scale(1.05);
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px #0f0;
}

.subtitle {
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.password-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

#password-input {
    width: 100%;
    padding: 0.8rem;
    padding-right: 3.5rem;
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    font-size: 1rem;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Roboto Mono', monospace;
}

#password-input:focus {
    outline: none;
    border-color: #0f0;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

#password-input.masked {
    -webkit-text-security: disc;
    text-security: disc;
}

#toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    border-radius: 3px;
    transition: color 0.2s ease;
}

#toggle-password:hover {
    color: #0f0;
}

#toggle-password svg {
    display: block;
}

.strength-meter {
    height: 10px;
    width: 100%;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #444;
}

.strength-bar {
    height: 100%;
    width: 0;
    background-color: #ff4136; /* red */
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

#result {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-right: 0;
}

#result-text {
    font-size: 1.1rem;
    margin: 0;
    color: #aaa;
}

#time-to-crack {
    font-size: 1.5rem;
    margin: 0.5rem 0 0 0;
    font-weight: 700;
    word-wrap: break-word;
    color: #fff;
}

.share-container {
    position: relative;
    margin-top: 1rem;
    z-index: 5;
}

.share-button {
    background-color: #0f0;
    color: #000;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    background-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

.share-options {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    margin-top: 10px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    z-index: 10;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    width: 250px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border: none;
    border-radius: 5px;
    padding: 0.7rem;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-option:hover {
    background-color: #444;
}

.share-option img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
}

.hidden {
    display: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 255, 0, 0.8);
    color: #000;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.toast.visible {
    opacity: 1;
}

.criteria {
    text-align: left;
    color: #ccc;
    font-size: 0.9rem;
    border-top: 1px solid #444;
    padding-top: 1.5rem;
}

.criteria h3 {
    color: #0f0;
    margin-top: 0;
    margin-bottom: 1rem;
}

.criteria ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.criteria li {
    margin-bottom: 0.5rem;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.criteria li.met {
    color: #0f0;
    text-decoration: line-through;
}

.share-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    fill: #fff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        padding: 1rem 1.5rem;
        margin-top: 3rem;
    }
    
    .thank-you-tab {
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    #password-input {
        font-size: 1rem;
        padding: 0.8rem;
        padding-right: 3.5rem;
    }
    
    #time-to-crack {
        font-size: 1.2rem;
    }
    
    .share-options {
        width: 200px;
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    .share-option {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
    
    .criteria {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .thank-you-tab {
        font-size: 0.65rem;
        padding: 0.4rem 0.6rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #time-to-crack {
        font-size: 1rem;
    }
    
    .share-options {
        width: 180px;
    }
}