/* Sign In Page Specific Styles */

/* Loading Overlay */
.auth-loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(3px);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-loading-content {
	text-align: center;
	color: white;
	padding: 2rem;
}

.auth-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid white;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 1.5rem;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.auth-loading-content p {
	margin: 0.5rem 0;
	font-size: 1.2rem;
	font-weight: 500;
}

.auth-loading-subtext {
	font-size: 0.9rem;
	opacity: 0.8;
}

.signin-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
	padding: 0;
}

.signin-header {
	padding: 20px;
	text-align: center;
}

.logo-link {
	display: inline-block;
	transition: transform 0.3s ease;
}

.logo-link:hover {
	transform: scale(1.05);
}

.signin-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Authentication View */
.auth-view {
	display: none;
	width: 100%;
	max-width: 450px;
	margin: 0 auto;
}

.auth-view.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

.auth-card {
	background: white;
	border-radius: 20px;
	padding: 40px 30px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.auth-header {
	text-align: center;
	margin-bottom: 40px;
}

.auth-icon, .app-icon {
	width: 80px;
	height: 80px;
	margin-bottom: 20px;
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-icon {
	width: 60px;
	height: 60px;
	border-radius: 14px;
}

.auth-header h1 {
	font-size: 28px;
	margin-bottom: 10px;
	background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.auth-header .subtitle {
	color: #666;
	font-size: 16px;
}

/* Authentication Buttons */
.auth-buttons {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.auth-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 14px 24px;
	border: none;
	border-radius: 25px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
}

.button-icon {
	flex-shrink: 0;
}

/* Apple Button */
.apple-button {
	background: #000;
	color: white;
}

.apple-button:hover {
	background: #333;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Google Button */
.google-button {
	background: white;
	color: #333;
	border: 1px solid #dadce0;
}

.google-button:hover {
	background: #f8f9fa;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Secondary Button */
.secondary-button {
	background: transparent;
	color: #666;
	border: 1px solid #dadce0;
}

.secondary-button:hover {
	background: #f8f9fa;
	transform: translateY(-2px);
}

/* Divider */
.divider {
	text-align: center;
	margin: 20px 0;
	position: relative;
}

.divider::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
	height: 1px;
	background: #dadce0;
}

.divider span {
	background: white;
	padding: 0 16px;
	position: relative;
	color: #999;
	font-size: 14px;
}

/* Auth Footer */
.auth-footer {
	margin-top: 30px;
	text-align: center;
}

.auth-footer p {
	color: #666;
	font-size: 14px;
	margin-bottom: 5px;
}

.auth-footer .hint {
	color: #999;
	font-size: 12px;
}

/* Dashboard View */
.dashboard-view {
	display: none;
	width: 100%;
	max-width: 450px !important;
	margin: 0 auto;
	animation: fadeIn 0.3s ease;
}

.dashboard-view.active {
	display: block;
	max-width: 450px !important;
}

#dashboard-view {
	max-width: 450px !important;
}

.user-card {
    background: white;
    border-radius: 20px;
    /* Match auth-card horizontal padding to keep visual widths identical */
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.user-avatar {
	position: relative;
	width: 80px;
	height: 80px;
	margin: 0 auto 20px;
}

.status-badge {
	position: absolute;
	bottom: 0;
	right: 0;
	background: #4caf50;
	color: white;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	border: 3px solid white;
}

.user-info {
	text-align: center;
	margin-bottom: 30px;
}

.signed-in-label {
	color: #999;
	font-size: 14px;
	margin-bottom: 5px;
}

.user-info h2 {
	font-size: 24px;
	margin-bottom: 5px;
	color: #333;
}

.user-email {
	color: #666;
	font-size: 14px;
}

/* Dashboard Actions */
.dashboard-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 30px;
	width: 100%;
	box-sizing: border-box;
}

.dashboard-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	background: #f8f9fa;
	border: 1px solid #dadce0;
	border-radius: 12px;
	text-decoration: none;
	color: #333;
	font-weight: 500;
	transition: all 0.3s ease;
	cursor: pointer;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dashboard-button:hover {
	background: #fff;
	transform: translateX(5px);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-button.primary {
	background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
	color: white;
	border: none;
}

.dashboard-button.primary:hover {
	transform: translateX(5px);
	box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.dashboard-button.signout {
	color: #dc3545;
	background: transparent;
	border-color: #dc3545;
}

.dashboard-button.signout:hover {
	background: #fff5f5;
}

/* Features Grid */
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.feature-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 8px;
	font-size: 13px;
	color: #666;
}

.feature-icon {
	font-size: 18px;
}

/* Footer */
.signin-footer {
	padding: 20px;
	text-align: center;
}

.signin-footer nav {
	display: flex;
	gap: 20px;
	justify-content: center;
}

.signin-footer a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

.signin-footer a:hover {
	color: white;
}

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

/* Responsive Design */
@media (max-width: 480px) {
	.auth-card {
		padding: 30px 20px;
	}
	
	.auth-header h1 {
		font-size: 24px;
	}
	
	.auth-button {
		padding: 12px 20px;
		font-size: 15px;
	}
	
	.user-card {
		padding: 30px 20px;
	}
	
	.features-grid {
		grid-template-columns: 1fr;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.signin-container {
		background: linear-gradient(135deg, #d84315 0%, #bf360c 100%);
	}
	
	.auth-card,
	.user-card {
		background: #1a1a1a;
		color: #f0f0f0;
	}
	
	.auth-header h1 {
		color: #f0f0f0;
	}
	
	.auth-header .subtitle,
	.auth-footer p {
		color: #aaa;
	}
	
	.google-button {
		background: #2a2a2a;
		color: #f0f0f0;
		border-color: #444;
	}
	
	.google-button:hover {
		background: #333;
	}
	
	.secondary-button {
		color: #bbb;
		border-color: #444;
	}
	
	.secondary-button:hover {
		background: #2a2a2a;
	}
	
	.divider::before {
		background: #444;
	}
	
	.divider span {
		background: #1a1a1a;
		color: #666;
	}
	
	.dashboard-button {
		background: #2a2a2a;
		border-color: #444;
		color: #f0f0f0;
	}
	
	.dashboard-button:hover {
		background: #333;
	}
	
	.feature-item {
		background: #2a2a2a;
		color: #aaa;
	}
}

/* User ID Footer */
.user-id-footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	text-align: center;
	font-size: 11px;
	color: #999;
	word-break: break-all;
}

.user-id-label {
	margin-right: 4px;
}

.user-id-value {
	font-family: 'Courier New', monospace;
	font-size: 4px;
	color: #666;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	transition: all 0.2s ease;
	user-select: all;
	-webkit-user-select: all;
}

.user-id-value:hover {
	background-color: rgba(0, 0, 0, 0.05);
	color: #333;
}

.user-id-value:active {
	background-color: rgba(0, 0, 0, 0.1);
}

.copy-feedback {
	display: inline-block;
	margin-left: 8px;
	color: #4CAF50;
	font-weight: 500;
	opacity: 0;
	transform: translateY(2px);
	transition: all 0.3s ease;
	pointer-events: none;
}

.copy-feedback.show {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
	.user-id-footer {
		border-top-color: rgba(255, 255, 255, 0.1);
	}
	
	.user-id-value {
		color: #aaa;
	}
	
	.user-id-value:hover {
		background-color: rgba(255, 255, 255, 0.1);
		color: #ddd;
	}
}
