:root {
  /* Color variables */
  --color-background: #fff;
  --color-sidebar-bg: #f8f9fa;
  --color-border: #dadce0;
  --color-text-primary: #202124;
  --color-text-secondary: #5f6368;
  --color-primary: #1a73e8;
  --color-primary-light: #e8f0fe;
  --color-primary-dark: #1565c0;
  --color-hover: #e8eaed;
  --color-danger: #ea4335;
  --color-error-bg: #fce8e6;
  --color-error-text: #d93025;
  --color-shadow: rgba(0, 0, 0, 0.12);
  --color-modal-backdrop: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    display: flex;
}

.sidebar {
    width: 320px;
    height: 100vh;
    background-color: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    color: var(--color-text-primary);
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    padding: 8px;
}

.sidebar-header {
    padding: 16px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.sidebar-nav {
    margin-bottom: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 0 24px 24px 0;
    /* margin-right: 12px; */
}

.nav-item:hover {
    background-color: var(--color-hover);
}

.nav-item.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.nav-item i {
    /* margin-right: 12px; */
}

.nav-item a {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    flex-grow: 1;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 8px 0;
}

.folders-section {
    flex-grow: 1;
    overflow-y: auto;
}

.folders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}

.folders-header h2 {
    margin: 0;
    font-size: 28px;
} 

.create-folder-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 30px;
}

.create-folder-btn:hover {
    background-color: var(--color-hover);
}

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

.sidebar-folder-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 0 24px 24px 0;
    margin-right: 12px;
}

.sidebar-folder-item:hover {
    background-color: var(--color-hover);
}

.sidebar-folder-icon {
    margin-right: 12px;
    color: var(--color-text-secondary);
}

.folder-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

.no-folders {
    padding: 8px 16px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-style: italic;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--color-border);
}

.storage-bar {
    height: 4px;
    background-color: var(--color-hover);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-used {
    height: 100%;
    background-color: var(--color-primary);
}

.storage-text {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.app-container {
    display: flex;
    height: 100vh;
}

.content {
    flex-grow: 1;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.upload-btn {
    background-color: var(--color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    max-height: 33px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.file-item, .folder-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.folder-item {
    display: grid;    
    position: relative;
}

.file-item:hover, .folder-item:hover {
    background-color: #f5f5f5;
    border-color: var(--color-primary);
    box-shadow: 0 1px 3px var(--color-shadow);
}

.file-icon, .folder-icon {
    font-size: 40px;
    margin-bottom: 8px;
    text-align: center;
}

.file-name, .folder-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: var(--color-text-secondary);
    margin-top: 48px;
}

.header {
    width: 100%;
    border-bottom: 1px solid var(--color-border); 
}

.header h1 {
    background-color: var(--color-sidebar-bg);
    color: var(--color-text-secondary);
    padding: 20px;
}

.header h3 {
    padding: 0 20px;
    margin: 0;
    color: var(--color-text-secondary);
    padding-top: 10px;
    padding-bottom: 10px; 
}

.bottom-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-logo img {
    height: 82px;
    margin-right: 12px;
}

.sidebar-logo h1 {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.6;
}

.file-item {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.file-item:hover {
    background-color: #f5f5f5;
    border-color: var(--color-primary);
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--color-modal-backdrop);
}

.modal-content {
  background-color: var(--color-background);
  margin: 10% auto;
  width: clamp(400px, 50%, 600px);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  padding: 0; /* Remove existing padding */
}

.close {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    color: var(--color-text-secondary);
    text-decoration: none;
    cursor: pointer;
}

.close:hover {
    color: var(--color-text-primary);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.modal-body {
    padding: 24px;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
}

.detail-label {
    width: 80px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.detail-value {
    color: var(--color-text-primary);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.modal-button {
    flex: 1;
    gap: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    max-width: 100px;
}

.modal-button.primary {
    background-color: var(--color-primary);
    color: white;
}

.modal-button.danger {
    background-color: var(--color-danger);
    color: white;
}

.modal-button:hover {
    opacity: 0.9;
}

/* Auth Pages (Login/Signup) */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    border-radius: 8px;
    box-shadow: 0 1px 4px var(--color-shadow);
    padding: 48px;
    background-color: white;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    text-align: center;
}

.auth-header img {
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.auth-button {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.auth-button:hover {
    background-color: var(--color-primary-dark);
}

.auth-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.auth-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: var(--color-error-bg);
    color: var(--color-error-text);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.delete-folder {
    position: absolute;
    top: 6%;
    right: 6%;
    visibility: hidden;
}

.folder-item:hover .delete-folder {
    visibility: visible;
    opacity: 1;
}

.share-folder {
    position: absolute;
    top: 25%;
    right: 6%;
    visibility: hidden;
}

.folder-item:hover .share-folder {
    visibility: visible;
    opacity: 1;
}

/* Add these styles to the bottom of your existing CSS file */

/* Form Container Styling */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background-color: var(--color-background);
    border-radius: 8px;
    box-shadow: 0 1px 4px var(--color-shadow);
}

/* Form Select Styling */
.form-select {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    background-color: var(--color-background);
    transition: border-color 0.2s;
}

.form-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* File Input Styling */
.file-input-container {
    margin-top: 8px;
}

.file-input-container input[type="file"] {
    padding: 10px 10px;
    width: 100%;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.btn-secondary {
    padding: 12px 24px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-background);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: var(--color-hover);
}

/* Folder select header with create link */
.folder-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.create-folder-link {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
}

.create-folder-link:hover {
    text-decoration: underline;
}

/* Fix for content layout */
.content {
    padding: 20px;
}

/* Make sure form fields are all same width */
.form-group {
    width: 100%;
}

/* Make sure auth-button fills width when alone */
.auth-button {
    flex: 1;
    max-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .auth-button, .btn-secondary {
        max-width: none;
        width: 100%;
    }
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #c3e6cb;
}

/* Share Modal Styles */
.share-modal-content {
    width: 500px;
    max-width: 90vw;
}

.share-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.email-input-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
}

.send-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
}

.send-btn:hover {
    background-color: var(--color-primary-dark);
}

.send-btn:disabled {
    background-color: var(--color-text-secondary);
    cursor: not-allowed;
}

.permissions-section {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

.share-link-section {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

.share-link-section h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
}

.link-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-sidebar-bg);
    font-size: 14px;
}

.copy-btn {
    cursor: pointer;
    transition: fill 0.2s ease;
    margin-left: 5px;
}

.copy-btn:hover {
    fill: var(--color-primary);
}

.link-description {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* Share/Delete buttons on items */
.delete-folder, .share-folder, .share-file {
    position: absolute;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.delete-folder {
    top: 8px;
    right: 8px;
    color: var(--color-danger);
}

.share-folder, .share-file {
    top: 8px;
    right: 44px;
    color: var(--color-primary);
}

.folder-item:hover .delete-folder,
.folder-item:hover .share-folder,
.file-item:hover .share-file {
    opacity: 1;
}

.delete-folder:hover {
    background-color: var(--color-error-bg);
    border-color: var(--color-danger);
}

.share-folder:hover, .share-file:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* Ensure folder/file items have relative positioning */
.folder-item, .file-item {
    position: relative;
}

.shared-indicator {
    font-size: 10px;
    color: #9aa0a6;
    margin-top: 4px;
    display: block;
    opacity: 0.7;
    font-weight: 400;
    line-height: 1.2;
}

/* Make shared files slightly different but subtle */
.file-item.shared-file {
    border-left: 2px solid #e8f0fe;
}

/* Optional: Only show the shared indicator on hover for even less prominence */
.shared-indicator {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item.shared-file:hover, .shared-indicator {
    opacity: 0.7;
}

.button-section {
    flex: 1;
    display: flex;
    gap: 12px;
}

.header-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-encryption {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.key-container {
    display: flex;
    justify-content: space-between;
}

/* Style for the <li> element */
.key-container li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: var(--color-background);
    font-size: 14px;
    color: var(--color-text-primary);
}

/* Style for the copy button inside the <li> */
.key-container li svg {
 
}

.key-container li svg:hover {
}