* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s, transform 0.1s;
    display: inline-block;
}

.btn:hover {
    background: #5568d3;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.result {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.share-option {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.share-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.share-option h4 {
    color: #555;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.share-field {
    margin-bottom: 12px;
}

.field-label {
    font-size: 12px;
    color: #777;
    display: block;
    margin-bottom: 4px;
}

.copy-container {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.copy-field {
    flex: 1;
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 0;
    width: 80px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #6c757d;
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 13px;
    color: #856404;
}

.warning strong {
    display: block;
    margin-bottom: 5px;
}

.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    color: #721c24;
}

.security-tip {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.security-tip strong {
    display: block;
    color: #004085;
    margin-bottom: 10px;
    font-size: 14px;
}

.tip-content {
    font-size: 13px;
    line-height: 1.6;
}

.tip-bad {
    color: #721c24;
    margin-bottom: 6px;
}

.tip-good {
    color: #155724;
}

.tip-label {
    font-weight: 600;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 8px;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-secure {
    background: #d4edda;
    color: #155724;
}

.share-option-recommended {
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin-left: -15px;
    margin-right: -15px;
}

.hidden {
    display: none;
}

.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.key-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.key-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.key-input-container label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.key-input-row {
    display: flex;
    gap: 10px;
}

.key-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    transition: border-color 0.3s;
}

.key-input:focus {
    outline: none;
    border-color: #667eea;
}

.key-input.invalid {
    border-color: #dc3545;
}

.ttl-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ttl-section label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.ttl-section select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.ttl-section select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>') center/20px no-repeat;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.btn-icon:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.btn-icon.visible {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/><line x1="1" y1="1" x2="23" y2="23"/></svg>');
    border-color: #667eea;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.info-text {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
}

.encryption-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.encryption-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-tab {
    flex: 1;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #555;
}

.mode-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.mode-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.mode-content {
    margin-top: 15px;
}

.password-input-container label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    margin-top: 12px;
}

.password-input-container label:first-child {
    margin-top: 0;
}

.password-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
}

.password-reminder {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 13px;
    color: #004085;
}

.password-reminder strong {
    margin-right: 5px;
}

/* Content Type Tabs */
.content-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.content-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #555;
}

.content-tab svg {
    width: 20px;
    height: 20px;
}

.content-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.content-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* File Upload Styles */
.file-drop-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-input-hidden {
    display: none;
}

.file-drop-content {
    pointer-events: none;
}

.file-drop-icon {
    width: 48px;
    height: 48px;
    color: #999;
    margin-bottom: 15px;
}

.file-drop-zone:hover .file-drop-icon,
.file-drop-zone.drag-over .file-drop-icon {
    color: #667eea;
}

.file-drop-text {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
}

.file-browse-link {
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
}

.file-drop-hint {
    font-size: 13px;
    color: #888;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 15px;
}

.file-info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    border-radius: 8px;
    color: white;
}

.file-info-icon svg {
    width: 24px;
    height: 24px;
}

.file-info-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.file-info-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-size {
    font-size: 13px;
    color: #666;
}

.file-remove-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #888;
    transition: all 0.2s;
}

.file-remove-btn:hover {
    background: #fee2e2;
    color: #dc3545;
}

.file-remove-btn svg {
    width: 18px;
    height: 18px;
}
