
* { box-sizing: border-box; margin: 0; padding: 0; }
:root { 
    --dark-bg: #080e1a; --grid-line-color: rgba(35, 53, 84, 0.35);
    --glass-bg: rgba(18, 30, 58, 0.6); --glass-highlight: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(0, 191, 255, 0.2); --inner-shadow: rgba(0, 0, 0, 0.4);
    --outer-shadow: rgba(0, 0, 0, 0.5); --input-bg: rgba(10, 20, 40, 0.75);
    --input-border: rgba(35, 53, 84, 0.9); --text-primary: #e6f1ff;
    --text-secondary: #b0c4de; --text-tertiary: #88a1c9;
    --accent-blue: #12b8f9; --accent-glow: rgba(18, 184, 249, 0.6);
    --hover-blue-bg: rgba(18, 184, 249, 0.15); --hover-blue-shadow: rgba(18, 184, 249, 0.4);
    --feedback-bg: var(--accent-blue); --feedback-text: var(--dark-bg);
    --reset-button-color: #ff7b72; --reset-button-border: rgba(255, 123, 114, 0.4);
    --reset-button-hover-bg: rgba(255, 123, 114, 0.15);
    --modal-text-bg: rgba(5, 12, 25, 0.85); 
}
body { 
    background-color: var(--dark-bg); background-image: linear-gradient(var(--grid-line-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px), radial-gradient(circle at center center, rgba(18, 184, 249, 0.1), transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%; background-position: center center; color: var(--text-secondary); font-family: 'Montserrat', sans-serif; display: flex; flex-direction: column; align-items: center; min-height: 100vh; margin-bottom: 150px; padding: 40px; overflow-x: hidden;
}

/* CONDENSED Header styles */
.header-section { width: 100%; max-width: 900px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-bottom: 30px; padding-top: 20px; margin-bottom: 0; z-index: 5; }
.site-heading { color: var(--text-primary); letter-spacing: 0.05em; padding-bottom: 10px; margin: 0; font-family: Montserrat, sans-serif; font-size: clamp(32px, 6vw, 48px); font-weight: 800; line-height: 1.1; text-decoration: none; text-shadow: 0 0 15px rgba(18, 184, 249, 0.3); }
.home-button { display: inline-block; padding: 10px 25px; color: var(--text-secondary); background-color: transparent; border: 1px solid var(--text-tertiary); border-radius: 8px; text-decoration: none; transition: all 0.2s ease-out; cursor: pointer; font-family: 'Roboto Mono', monospace; font-size: 13px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.6px; }
.home-button:hover { border-color: var(--accent-blue); color: var(--accent-blue); background-color: var(--hover-blue-bg); }
.home-button .button-text { font-family: Montserrat, sans-serif; font-size: 14px; font-weight: 600; line-height: 1; text-align: center; display: block; transition: color 0.2s ease-out; }
.home-button:hover .button-text { color: var(--accent-blue); }


/* CONDENSED Main container styles */
#main-container { position: relative; width: 100%; max-width: 850px; /* Keep wider */ padding: 40px; background: linear-gradient(145deg, var(--glass-highlight), transparent 30%), var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 16px 40px var(--outer-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.08), inset 0 -1px 1px rgba(0, 0, 0, 0.2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 2; margin-top: 30px; }
h1.container-heading { color: var(--accent-blue); font-family: 'Montserrat', sans-serif; font-weight: 700; text-align: center; margin-bottom: 15px; letter-spacing: 1.8px; text-shadow: 0 0 12px var(--accent-glow); text-transform: uppercase; font-size: 24px; }
hr.header-rule { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-blue), transparent); opacity: 0.4; margin-bottom: 30px; }
p.input-label { color: var(--text-secondary); font-family: 'Roboto Mono', monospace; font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; opacity: 0.9; }
textarea { width: 100%; background-color: var(--input-bg); border: 1px solid var(--input-border); border-radius: 8px; color: var(--text-primary); font-family: 'Roboto Mono', monospace; font-size: 15px; padding: 16px; resize: vertical; transition: all 0.3s ease; box-shadow: inset 0 2px 6px var(--inner-shadow); margin-bottom: 0; /* Handled by parent gap */ }
textarea:focus { outline: none; border-color: rgba(18, 184, 249, 0.6); background-color: rgba(10, 25, 47, 0.85); box-shadow: inset 0 2px 6px var(--inner-shadow), 0 0 10px var(--hover-blue-shadow); }
textarea[readonly] { background-color: rgba(5, 12, 25, 0.8); cursor: default; }










/* Side-by-side textareas */
#text-areas-container { display: flex; gap: 30px; width: 100%; margin-bottom: 25px; }
.textarea-group { flex: 1; display: flex; flex-direction: column; }
.textarea-group textarea { flex-grow: 1; min-height: 220px; }

/* Full width Decrypt Button Group */
#action-group { margin-bottom: 20px; /* Space below Decrypt button */}
#decrypt-button {
    display: block; width: 100%; padding: 15px 20px; font-size: 16px;
    /* Inherit general button style + primary action tweaks */
    color: var(--text-primary);
    background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2)), var(--light-navy);
    border-color: var(--input-border);
}
#decrypt-button:not(:disabled):hover {
    color: var(--accent-blue); border-color: var(--accent-blue);
    background: linear-gradient(rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25)), var(--hover-blue-bg);
}

/* Secondary Actions Row */
#secondary-actions {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 5px; 
}
#secondary-actions-left { display: flex; gap: 8px; }
#secondary-actions button { 
     padding: 10px 18px; 
     margin-top: 0; 
     font-size: 12px; 
}

#reset-button { color: var(--reset-button-color); border-color: var(--reset-button-border); }
#reset-button:hover { 
    color: #ff9a93; border-color: var(--reset-button-color);
    background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.15)), var(--reset-button-hover-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4), 0 0 12px rgba(255, 123, 114, 0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}










/* CONDENSED General Button Style */
button { font-family: 'Roboto Mono', monospace; font-size: 13px; font-weight: bold; color: var(--accent-blue); background: linear-gradient(rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.1)), var(--input-bg); border: 1px solid var(--input-border); border-radius: 8px; padding: 11px 22px; cursor: pointer; transition: all 0.2s ease-out; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.6px; box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); }
button:hover { border-color: rgba(18, 184, 249, 0.7); color: #fff; background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.15)), var(--hover-blue-bg); box-shadow: 0 2px 5px rgba(0,0,0,0.4), 0 0 12px var(--hover-blue-shadow), inset 0 1px 0 rgba(255,255,255,0.08); }
button:active { transform: scale(0.97); box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); }
button:disabled { border-color: var(--input-border) !important; color: var(--text-tertiary) !important; background: var(--input-bg) !important; cursor: not-allowed; opacity: 0.5; box-shadow: inset 0 1px 3px rgba(0,0,0,0.4); transform: none; }

/* CONDENSED Saved Items Section */
.or-separator { color: var(--text-tertiary); font-family: 'Roboto Mono', monospace; font-size: 14px; text-align: center; margin: 40px 0 25px 0; text-transform: uppercase; letter-spacing: 1px; }
#saved-items-section { width: 100%; max-width: 850px; margin: 20px auto 0 auto; }
.section-subheading { color: var(--text-secondary); font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 600; text-align: center; margin-bottom: 25px; letter-spacing: 1px; }
#saved-items-container { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.saved-item-card { padding: 20px 25px; background: linear-gradient(145deg, var(--glass-highlight), transparent 30%), var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; width: 100%; }
.saved-item-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--hover-blue-shadow); }
.saved-item-card h4 { color: var(--accent-blue); font-size: 14px; margin-bottom: 8px; font-family: 'Roboto Mono', monospace; }
.saved-item-card p { color: var(--text-secondary); font-size: 13px; word-break: break-all; font-family: 'Roboto Mono', monospace; line-height: 1.4; max-height: 60px; overflow: hidden; text-overflow: ellipsis; }

/* CONDENSED MODAL STYLES (Side-by-Side Content) */
#modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
#modal-overlay.modal-visible { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s linear 0s; }
#modal-content { background: var(--glass-bg); padding: 30px 40px 40px 40px; border-radius: 14px; border: 1px solid var(--glass-border); box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); width: 90%; max-width: 900px; /* Wider for side-by-side */ position: relative; color: var(--text-primary); max-height: 85vh; display: flex; flex-direction: column; }
#modal-content h3 { color: var(--accent-blue); margin-bottom: 25px; font-family: 'Montserrat', sans-serif; font-size: 18px; text-align: center; }
#modal-close-button { position: absolute; top: 15px; right: 15px; background: none; border: none; color: var(--text-tertiary); font-size: 28px; line-height: 1; padding: 0; cursor: pointer; transition: color 0.2s ease; }
#modal-close-button:hover { color: var(--accent-blue); }
.modal-hidden { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s !important; }


#modal-body {
    display: flex;
    gap: 25px; 
    width: 100%;
    overflow-y: auto; 
     max-height: calc(85vh - 120px);
}

.modal-text-area {
    flex: 1; 
    display: flex;
    flex-direction: column; 
    min-width: 0; 
}
.modal-label { font-family: 'Roboto Mono', monospace; font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: 8px; }
.modal-text-area pre {
    font-family: 'Roboto Mono', monospace; font-size: 14px; line-height: 1.6;
    white-space: pre-wrap; word-wrap: break-word;
    background-color: var(--modal-text-bg); padding: 15px; border-radius: 6px;
    border: 1px solid var(--input-border);
    flex-grow: 1; 
    overflow-y: auto; color: var(--text-primary);
    margin-bottom: 10px;
    min-height: 100px; 
}
.modal-copy-button { align-self: flex-end; padding: 6px 12px; font-size: 11px; margin-top: 5px; /* Add margin top */ }








  /* Footer Credits */
  .a2-credits {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #ffffffa0;
    font-size: 1 rem;
    padding: 0.8rem 1.2rem;
    text-align: center;
    line-height: 1.5;
    z-index: 20;
  
    background: linear-gradient(to top, rgba(0, 0, 0, 0.51), rgba(0, 0, 0, 0.077));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.05);
  }
  
  .a2-credits a {
    color: inherit;
    text-decoration: underline;
  }